Commit b02034dd authored by Sebastian Dröge's avatar Sebastian Dröge

matroskademux: We need an index and index entry for reverse playback

Reverse playback does not work with index-less files yet.
parent d90686f7
......@@ -1979,14 +1979,6 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux,
GST_DEBUG_OBJECT (demux, "New segment %" GST_SEGMENT_FORMAT, &seeksegment);
if (!update) {
/* only have to update some segment,
* but also still have to honour flush and so on */
GST_DEBUG_OBJECT (demux, "... no update");
/* bad goto, bad ... */
goto next;
}
/* check sanity before we start flushing and all that */
snap_next = after && !before;
if (seeksegment.rate < 0)
......@@ -2001,11 +1993,28 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux,
GST_DEBUG_OBJECT (demux, "No matching seek entry in index");
GST_OBJECT_UNLOCK (demux);
return FALSE;
} else if (rate < 0.0) {
/* FIXME: We should build an index during playback or when scanning
* that can be used here. The reverse playback code requires seek_index
* and seek_entry to be set!
*/
GST_DEBUG_OBJECT (demux,
"No matching seek entry in index, needed for reverse playback");
GST_OBJECT_UNLOCK (demux);
return FALSE;
}
}
GST_DEBUG_OBJECT (demux, "Seek position looks sane");
GST_OBJECT_UNLOCK (demux);
if (!update) {
/* only have to update some segment,
* but also still have to honour flush and so on */
GST_DEBUG_OBJECT (demux, "... no update");
/* bad goto, bad ... */
goto next;
}
if (demux->streaming) {
GST_OBJECT_LOCK (demux);
/* now update the real segment info */
......
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