summaryrefslogtreecommitdiffstats
path: root/demux/demux_lavf.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-05-03 21:32:34 +0200
committerwm4 <wm4@nowhere>2013-05-05 18:44:24 +0200
commit18c383f51b59b97715cfd141d81c2bdddbc4a9c8 (patch)
tree330c0dc4e18abf5fecd03d3e36d9392b79048746 /demux/demux_lavf.c
parent4ed22795bbe41838616e2cc941da792502791025 (diff)
downloadmpv-18c383f51b59b97715cfd141d81c2bdddbc4a9c8.tar.bz2
mpv-18c383f51b59b97715cfd141d81c2bdddbc4a9c8.tar.xz
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.
Diffstat (limited to 'demux/demux_lavf.c')
-rw-r--r--demux/demux_lavf.c2
1 files changed, 1 insertions, 1 deletions
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;