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 488201 - gst_segment_set_newsegment does not accumulate correctly
gst_segment_set_newsegment does not accumulate correctly
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal blocker
: 0.10.15
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks: 494245
 
 
Reported: 2007-10-19 09:37 UTC by Julien MOUTTE
Modified: 2007-11-09 11:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch to not accumulate when updating (1.07 KB, patch)
2007-10-22 15:47 UTC, Julien MOUTTE
none Details | Review
patch to accumulate correctly (11.06 KB, patch)
2007-11-09 10:51 UTC, Wim Taymans
committed Details | Review

Description Julien MOUTTE 2007-10-19 09:37:27 UTC
When receiving a sequence of segments like this :

update 0 rate -1.0 start 0 stop Y last_stop Y (typical reverse playback)

and then

update 1 rate -1.0 start X stop Y last_stop X (closing reverse playback segment, no flush)

update 0 rate 1.0 start X stop Z (duration) last_stop X (starting forward playback again)

The segment accumulated duration is wrong. Indeed the closing/update of the reverse playback segment is accumulating X when it should not accumulate anything until the non update segment arrives and then accumulate Y - X which is the duration we have played in reverse playback.
Comment 1 Julien MOUTTE 2007-10-22 15:47:47 UTC
Created attachment 97638 [details] [review]
Proposed patch to not accumulate when updating

that's probably not correct for all cases either but that makes reverse segment accumulation work fine.
Comment 2 Wim Taymans 2007-11-09 10:51:50 UTC
Created attachment 98809 [details] [review]
patch to accumulate correctly

patch and unit tests to fix the problem.
Comment 3 Jan Schmidt 2007-11-09 11:26:23 UTC
Looks ok to me, even though it isn't technically a regression
Comment 4 Wim Taymans 2007-11-09 11:57:10 UTC
        * gst/gstsegment.c: (gst_segment_set_newsegment_full),
        (gst_segment_to_stream_time), (gst_segment_to_running_time):
        Also accumulate time correctly when doing reverse playback. Fixes
        #488201,
        When converting to running and stream time, use default values for
        start/stop/time/accum when comparing different formats. Fixes #494245.

        * libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times):
        Do running/stream time in TIME format.

        * tests/check/gst/gstsegment.c: (GST_START_TEST),
        (gst_segment_suite):
        2 new unit tests for segment accumulation.