1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 07:12:39 +00:00

demux_lavf: fix DEMUXER_CTRL_RESYNC

This used the libavformat current position, instead of the mp stream
(which reflects current DVD/Bluray read position). This was broken,
because libavformat won't update its position by calling the user's
stream callbacks, negating the whole point of DEMUXER_CTRL_RESYNC.

Now DVD playback with libavformat seems to work relatively well.
This commit is contained in:
wm4 2013-05-03 21:32:34 +02:00
parent 4ed22795bb
commit 18c383f51b

View File

@ -834,7 +834,7 @@ redo:
* for us.
*/
avio_flush(priv->avfc->pb);
av_seek_frame(priv->avfc, 0, avio_tell(priv->avfc->pb),
av_seek_frame(priv->avfc, 0, stream_tell(demuxer->stream),
AVSEEK_FLAG_BYTE);
avio_flush(priv->avfc->pb);
return DEMUXER_CTRL_OK;