From 18c383f51b59b97715cfd141d81c2bdddbc4a9c8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 3 May 2013 21:32:34 +0200 Subject: [PATCH] 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. --- demux/demux_lavf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 1bb811837b..7137a22226 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -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;