After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 171400 - mmapsize property on gstfilesrc borked.
mmapsize property on gstfilesrc borked.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.8.10
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-03-23 19:36 UTC by Tristan Van Berkom
Modified: 2005-03-23 22:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix broken mmap property. (1.56 KB, patch)
2005-03-23 19:40 UTC, Tristan Van Berkom
none Details | Review

Description Tristan Van Berkom 2005-03-23 19:36:31 UTC
Hmmm, just started looking through the source to start hacking
my very own gstreamer element, and I found this broken logic
in the first source file I opened, call it beginners luck ;-)

I'm sure that this:
=====================
if ((src->mapsize % src->pagesize) == 0) {
  src->mapsize = g_value_get_ulong (value);
} else {
   ...
}
=====================
Was meant to test that the *new* mapsize be a multiple of pagesize;
not to only allow changing the mmap size if the current mmap size
is valid.

patch comming...
Comment 1 Tristan Van Berkom 2005-03-23 19:40:58 UTC
Created attachment 39147 [details] [review]
Patch to fix broken mmap property.

    This patch fixes the broken logic for mmap size set property,
also it removes the useless calls to g_object_notify () in the 
set_property function (g_object_notify() is only needed when
the property changes without passing through the g_object_set()
code path). Also the error reporting macro is enhanced to print 
the mmap size which was incompatible (instead of just the page size).
Comment 2 Ronald Bultje 2005-03-23 22:13:06 UTC
Thanks for noticing. We don't use that property too often as you can see... :).