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
1 changed files with 1 additions and 1 deletions

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;