mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +00:00
matroskademux: We need an index and index entry for reverse playback
Reverse playback does not work with index-less files yet.
This commit is contained in:
parent
d90686f722
commit
b02034dda1
1 changed files with 17 additions and 8 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue