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 511637 - videorate doesn't handle a second newsegment correctly
videorate doesn't handle a second newsegment correctly
Status: RESOLVED DUPLICATE of bug 435633
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-23 21:15 UTC by Antoine Tremblay
Modified: 2008-01-24 22:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the problem agains CVS from 23 Jan 2008 (1.58 KB, patch)
2008-01-23 21:16 UTC, Antoine Tremblay
none Details | Review

Description Antoine Tremblay 2008-01-23 21:15:57 UTC
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...
Comment 1 Antoine Tremblay 2008-01-23 21:16:40 UTC
Created attachment 103577 [details] [review]
Patch to fix the problem agains CVS from 23 Jan 2008
Comment 2 Antoine Tremblay 2008-01-24 22:35:50 UTC

*** This bug has been marked as a duplicate of 435633 ***