GNOME Bugzilla – Bug 370865
[basesrc] update segment duration in gst_base_src_update_length
Last modified: 2006-11-13 18:04:43 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.
Created attachment 76010 [details] [review]
doesn't break make check here.
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.