summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-30 22:50:44 +0100
committerwm4 <wm4@nowhere>2014-10-30 22:50:44 +0100
commit6c469dc9d9dde10bd284015548122985712535a9 (patch)
treedcc26aa8272b8e6baa38d9496cb387f193a93aec /stream
parenta77a171b7ff436cb63b13321427a259a2a8c8fc7 (diff)
downloadmpv-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 'stream')
-rw-r--r--stream/stream_lavf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c
index 76f2c8ee4e..286f9effcc 100644
--- a/stream/stream_lavf.c
+++ b/stream/stream_lavf.c
@@ -113,8 +113,10 @@ static int control(stream_t *s, int cmd, void *arg)
case STREAM_CTRL_AVSEEK: {
struct stream_avseek *c = arg;
int64_t r = avio_seek_time(avio, c->stream_index, c->timestamp, c->flags);
- if (r >= 0)
+ if (r >= 0) {
+ stream_drop_buffers(s);
return 1;
+ }
break;
}
case STREAM_CTRL_HAS_AVSEEK: