diff options
author | wm4 <wm4@nowhere> | 2014-10-30 22:50:44 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-30 22:50:44 +0100 |
commit | 6c469dc9d9dde10bd284015548122985712535a9 (patch) | |
tree | dcc26aa8272b8e6baa38d9496cb387f193a93aec /demux | |
parent | a77a171b7ff436cb63b13321427a259a2a8c8fc7 (diff) | |
download | mpv-6c469dc9d9dde10bd284015548122985712535a9.tar.bz2 mpv-6c469dc9d9dde10bd284015548122985712535a9.tar.xz |
demux_lavf, stream_lavf: drop local buffers on time-seeks
There was chance that some data was left in various local buffers after
time-seeks. Probably doesn't actually matter.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_lavf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index d1158619b7..e6b62adb12 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -189,8 +189,11 @@ static int64_t mp_read_seek(void *opaque, int stream_idx, int64_t ts, int flags) .flags = flags, }; - int ret = stream_control(stream, STREAM_CTRL_AVSEEK, &cmd); - return ret < 1 ? AVERROR(ENOSYS) : 0; + if (stream_control(stream, STREAM_CTRL_AVSEEK, &cmd) == STREAM_OK) { + stream_drop_buffers(stream); + return 0; + } + return AVERROR(ENOSYS); } static void list_formats(struct demuxer *demuxer) |