[gstreamer-bugs] [Bug 494245] New: [basesink] doesn't sync correctly if segment is in BYTES and a stop position is set

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Tue Nov 6 09:04:16 PST 2007


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=494245

  GStreamer | gstreamer (core) | Ver: HEAD CVS
           Summary: [basesink] doesn't sync correctly if segment is in BYTES
                    and a stop position is set
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: blocker
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: t.i.m at zen.co.uk
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Consider this pipeline:

 gst-launch-0.10 filesrc location=/some/file blocksize=100 ! identity
datarate=100 ! fakesink sync=true -v

Despite timestamps and durations being set correctly, fakesink will not sync
against the clock correctly from the second buffer onwards.

This, however, will work just fine:

 gst-launch-0.10 fakesrc sizemax=100 sizetype=fixed ! identity datarate=100 !
fakesink sync=true -v

The reason for this is that filesrc sends a newsegment event in BYTES format
with a stop position that equals the filesize.

Now, gst_base_sink_get_sync_times() in do_times calls
gst_segment_to_stream_time() and gst_segment_to_running_time() with the
timestamps and GST_FORMAT_BYTES as format.

gst_segment_to_*_time(), however, will not pay attention to the fact that
segment->format != format and goes on to return -1 here:

  if (segment->rate > 0.0) {
    /* outside of the segment boundary stop */
    if (G_UNLIKELY (segment->stop != -1 && position > segment->stop))
      return -1;

because the timestamp integer value is > the file size in bytes, so basesink
gets unsyncable positions returned and skips the sync.


(This can all be made to work by using single-segment=true on identity, but
that's not the point).


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=494245.




More information about the Gstreamer-bugs mailing list