[gstreamer-bugs] [Bug 511637] New: videorate doesn't handle a second newsegment correctly

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Wed Jan 23 13:15:57 PST 2008


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=511637

  GStreamer | gst-plugins-base | Ver: HEAD CVS
           Summary: videorate doesn't handle a second newsegment correctly
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: hexa00 at gmail.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Videorate calculates it's next_ts as : 

videorate->next_ts = videorate->segment.accum + videorate->segment.start +
        gst_util_uint64_scale (videorate->out,
        videorate->to_rate_denominator * GST_SECOND,
        videorate->to_rate_numerator);

But ->out (the number if frames outputed) is not reset when a newsegment is
received thus if a second newsegment is received, next ts will be in the future
of  
it's previous stream time relative to the new newsegment start.

  So if a stream played 30 frames a 30 frames per sec already.. and the new
newsegmetn is starting at Sec 5.. rather then start at sec 5.. it will start a
sec 6 .. When it should start at the newsegment start...

The next_ts should also be reset when receiving a newsegment so that it starts
at segment.start + segment.accum... (since intime is calculated as ts +
segment.accum)

Here's a patch to fix this issue...


-- 
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=511637.




More information about the Gstreamer-bugs mailing list