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 370865 - [basesrc] update segment duration in gst_base_src_update_length
[basesrc] update segment duration in gst_base_src_update_length
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2006-11-05 04:57 UTC by Jonathan Matthew
Modified: 2006-11-13 18:04 UTC
See Also:
GNOME target: ---
GNOME version: ---

trivial patch (637 bytes, patch)
2006-11-05 07:38 UTC, Jonathan Matthew
committed Details | Review

Description Jonathan Matthew 2006-11-05 04:57:01 UTC
While poking around at bug 341078, I noticed that when basesrc calls bclass->get_size() to update the length of the file, it doesn't store the result, so from then on, every call to gst_base_src_update_length() for a read past the initial size of the file will result in a (possibly expensive) call to bclass->get_size().  It looks like it would be a good idea to update the segment duration with the new size to avoid future get_size calls.
Comment 1 Jonathan Matthew 2006-11-05 07:38:16 UTC
Created attachment 76010 [details] [review]
trivial patch

doesn't break make check here.
Comment 2 Wim Taymans 2006-11-13 17:54:51 UTC
Thanks, I slightly modified it so that it stores the new size as the segment duration before clipping it to the segment boundary.

        Patch by: Jonathan Matthew <jonathan at kaolin dot wh9 dot net>

        * libs/gst/base/gstbasesrc.c: (gst_base_src_update_length):
        Store new length in segment duration so we don't keep on calling the
        potentially expensize get_size() call. Fixes #370865.