diff options
author | Rudolf Polzer <divverent@xonotic.org> | 2013-01-07 17:39:55 +0100 |
---|---|---|
committer | Rudolf Polzer <divverent@xonotic.org> | 2013-01-07 17:39:55 +0100 |
commit | 5a412bfa093a3ca6733e3031da9a3d001cc4e149 (patch) | |
tree | a6b8b5abaab7ddf0d8422e205de75e3585eb7873 | |
parent | 413b2e3b0f20cf3fc170d6a711cd93de124d5c7e (diff) | |
download | mpv-5a412bfa093a3ca6733e3031da9a3d001cc4e149.tar.bz2 mpv-5a412bfa093a3ca6733e3031da9a3d001cc4e149.tar.xz |
demux_lavf: implement DEMUXER_CTRL_RESYNC
This makes -chapter work with stream_dvd by telling ffmpeg to flush its
internal buffers after a stream_dvd seek.
-rw-r--r-- | demux/demux_lavf.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 552a9e8366..c067c376b5 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -1066,6 +1066,21 @@ redo: priv->cur_program = prog->progid = program->id; return DEMUXER_CTRL_OK; } + case DEMUXER_CTRL_RESYNC: + /* NOTE: + * + * We actually want to call ff_read_frame_flush() here, but it is + * internal. + * + * This function call seems to do the same for now. + * + * Once ff_read_frame_flush() is exported in some way, change this to + * call the new API instead of relying on av_seek_frame() to do this + * for us. + */ + av_seek_frame(priv->avfc, 0, avio_tell(priv->avfc->pb), + AVSEEK_FLAG_BYTE); + return DEMUXER_CTRL_OK; default: return DEMUXER_CTRL_NOTIMPL; } |