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 696911 - GstSegment adds lot of warning noise
GstSegment adds lot of warning noise
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2013-03-30 15:18 UTC by Matej Knopp
Modified: 2013-04-04 08:18 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Matej Knopp 2013-03-30 15:18:00 UTC
This patch

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.
Comment 1 Matej Knopp 2013-03-30 15:25:22 UTC
Example from


  /* set last stop position */
    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.
Comment 2 Nicolas Dufresne (ndufresne) 2013-03-30 18:03:38 UTC
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:
Comment 3 Matej Knopp 2013-03-30 21:10:51 UTC
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.
Comment 4 Matej Knopp 2013-03-30 21:14:32 UTC
Btw, in my opinion perhaps it would be better to be able to have negative running time, as well as negative timestamps.
Comment 5 Wim Taymans 2013-04-04 08:18:56 UTC
commit 95c6cd37a87984f35aa8b9b15ec32d4202b4b6b6
Author: Wim Taymans <>
Date:   Thu Apr 4 10:17:30 2013 +0200

    segment: don't WARN, just DEBUG