From: Mathieu Duponchelle Date: Wed, 21 Apr 2021 19:43:59 +0000 (+0200) Subject: tsdemux: fix truncated output segment when seeking with a stop X-Git-Tag: 1.19.3~507^2~500 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0fb7392131a9beb254e26d17060d4b8f7817ec57;p=platform%2Fupstream%2Fgstreamer.git tsdemux: fix truncated output segment when seeking with a stop In disabling the stop adjustment for negative rates in 03031037fafd2d535bbefb1fdf6024b5d1159043 , two instructions were inverted resulting in the stop always being adjusted by 0 Part-of: --- diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index 2f932c9..3198876 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -2616,10 +2616,9 @@ calculate_and_push_newsegment (GstTSDemux * demux, TSDemuxStream * stream, } else if (base->out_segment.start < firstts) { /* Take into account the offset to the first buffer timestamp */ if (base->out_segment.rate > 0) { - base->out_segment.start = firstts; - if (GST_CLOCK_TIME_IS_VALID (base->out_segment.stop)) base->out_segment.stop += firstts - base->out_segment.start; + base->out_segment.start = firstts; base->out_segment.position = firstts; } }