Commit aec7206d authored by Wim Taymans's avatar Wim Taymans
Browse files

gst/qtdemux/qtdemux.c: Make sure we always send a DISCONT after a seek by...

gst/qtdemux/qtdemux.c: Make sure we always send a DISCONT after a seek by setting the sample index to an undefined va...

Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (gst_qtdemux_perform_seek),
(gst_qtdemux_activate_segment),
(gst_qtdemux_prepare_current_sample),
(gst_qtdemux_loop_state_movie), (qtdemux_parse_trak):
Make sure we always send a DISCONT after a seek by setting the sample
index to an undefined value after a seek.
parent c4c7a688
2008-03-11 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/qtdemux/qtdemux.c: (gst_qtdemux_perform_seek),
(gst_qtdemux_activate_segment),
(gst_qtdemux_prepare_current_sample),
(gst_qtdemux_loop_state_movie), (qtdemux_parse_trak):
Make sure we always send a DISCONT after a seek by setting the sample
index to an undefined value after a seek.
2008-03-11 Tim-Philipp Müller <tim at centricular dot net> 2008-03-11 Tim-Philipp Müller <tim at centricular dot net>
   
* gst/avi/gstavisubtitle.h: (GST_IS_AVI_SUBTITLE), * gst/avi/gstavisubtitle.h: (GST_IS_AVI_SUBTITLE),
......
...@@ -699,7 +699,7 @@ gst_qtdemux_perform_seek (GstQTDemux * qtdemux, GstSegment * segment) ...@@ -699,7 +699,7 @@ gst_qtdemux_perform_seek (GstQTDemux * qtdemux, GstSegment * segment)
QtDemuxStream *stream = qtdemux->streams[n]; QtDemuxStream *stream = qtdemux->streams[n];
stream->time_position = desired_offset; stream->time_position = desired_offset;
stream->sample_index = 0; stream->sample_index = -1;
stream->segment_index = -1; stream->segment_index = -1;
stream->last_ret = GST_FLOW_OK; stream->last_ret = GST_FLOW_OK;
} }
...@@ -1267,8 +1267,10 @@ gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream, ...@@ -1267,8 +1267,10 @@ gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream,
} }
/* we're at the right spot */ /* we're at the right spot */
if (index == stream->sample_index) if (index == stream->sample_index) {
GST_DEBUG_OBJECT (qtdemux, "we are at the right index");
return TRUE; return TRUE;
}
/* find keyframe of the target index */ /* find keyframe of the target index */
kf_index = gst_qtdemux_find_keyframe (qtdemux, stream, index); kf_index = gst_qtdemux_find_keyframe (qtdemux, stream, index);
...@@ -1342,6 +1344,7 @@ gst_qtdemux_prepare_current_sample (GstQTDemux * qtdemux, ...@@ -1342,6 +1344,7 @@ gst_qtdemux_prepare_current_sample (GstQTDemux * qtdemux,
GstBuffer *buffer = (GstBuffer *) stream->buffers->data; GstBuffer *buffer = (GstBuffer *) stream->buffers->data;
if (stream->discont) { if (stream->discont) {
GST_LOG_OBJECT (qtdemux, "marking discont buffer");
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT); GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
stream->discont = FALSE; stream->discont = FALSE;
} }
...@@ -1700,6 +1703,7 @@ gst_qtdemux_loop_state_movie (GstQTDemux * qtdemux) ...@@ -1700,6 +1703,7 @@ gst_qtdemux_loop_state_movie (GstQTDemux * qtdemux)
goto next; goto next;
if (stream->discont) { if (stream->discont) {
GST_LOG_OBJECT (qtdemux, "marking discont buffer");
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT); GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
stream->discont = FALSE; stream->discont = FALSE;
} }
...@@ -3112,7 +3116,7 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) ...@@ -3112,7 +3116,7 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
stream->need_clip = FALSE; stream->need_clip = FALSE;
stream->segment_index = -1; stream->segment_index = -1;
stream->time_position = 0; stream->time_position = 0;
stream->sample_index = 0; stream->sample_index = -1;
stream->last_ret = GST_FLOW_OK; stream->last_ret = GST_FLOW_OK;
if (!(tkhd = qtdemux_tree_get_child_by_type (trak, FOURCC_tkhd))) if (!(tkhd = qtdemux_tree_get_child_by_type (trak, FOURCC_tkhd)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment