GNOME Bugzilla – Bug 696911
GstSegment adds lot of warning noise
Last modified: 2013-04-04 08:18:56 UTC
Now gst segment warns every time gst_segment_to_running_time is called with position outside of segment start/top.
i.e. during seek - the position usually starts before the segment boundary as the seek goes to keyframe before segment start
also basesink calls it with position=-1, gstcollectpads calls it with GST_BUFFER_DTS(buf) without checking if dts is valid. There are many places in gstreamer where the method is called with position outside of segment boundaries and I'm not sure why they all are now supposed to print warnings.
/* set last stop position */
if (G_LIKELY (stop != GST_CLOCK_TIME_NONE && cstop != GST_CLOCK_TIME_NONE))
segment->position = cstop;
segment->position = cstart;
rstart = gst_segment_to_running_time (segment, format, cstart);
rstop = gst_segment_to_running_time (segment, format, cstop);
it is valid that cstop = GST_CLOCK_TIME_NONE (hence the check) and basesink still calls gst_segment_to_running_time(segment, format, cstop), because it's harmless and just returns -1. But now it also prints a warning.
Actually the -1 is only harmless if you handle it. Currently there is few places where we endup having issues. There is an example at:
The API docs clearly state that you will get -1 if you pass value outside segment boundaries. It doesn't mean that such value warrants a warning though. And if someone decides that it does, then the api docs need to be updated alongside with the rest of the gstreamer to make sure that nothing calls it with such position.
Btw, in my opinion perhaps it would be better to be able to have negative running time, as well as negative timestamps.
Author: Wim Taymans <firstname.lastname@example.org>
Date: Thu Apr 4 10:17:30 2013 +0200
segment: don't WARN, just DEBUG