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:
parent
4ed22795bb
commit
18c383f51b
@ -834,7 +834,7 @@ redo:
|
|||||||
* for us.
|
* for us.
|
||||||
*/
|
*/
|
||||||
avio_flush(priv->avfc->pb);
|
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);
|
AVSEEK_FLAG_BYTE);
|
||||||
avio_flush(priv->avfc->pb);
|
avio_flush(priv->avfc->pb);
|
||||||
return DEMUXER_CTRL_OK;
|
return DEMUXER_CTRL_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user