qtdemux: remember reverse playback when verifying the segment end

Check if the rate is positive or negative to correctly compare the current
position with the segment to make reverse playback work
This commit is contained in:
Thiago Santos 2014-01-06 21:36:17 -03:00
parent 90a5565229
commit 5fe1b3eb28

View file

@ -4223,7 +4223,9 @@ gst_qtdemux_loop_state_movie (GstQTDemux * qtdemux)
/* check for segment end */
if (G_UNLIKELY (qtdemux->segment.stop != -1
&& qtdemux->segment.stop <= min_time
&& ((qtdemux->segment.rate >= 0 && qtdemux->segment.stop <= min_time)
|| (qtdemux->segment.rate < 0
&& qtdemux->segment.start > min_time))
&& qtdemux->streams[index]->on_keyframe)) {
GST_DEBUG_OBJECT (qtdemux, "we reached the end of our segment.");
qtdemux->streams[index]->time_position = -1;