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.
This commit is contained in:
wm4
2014-10-30 22:50:44 +01:00
parent a77a171b7f
commit 6c469dc9d9
2 changed files with 8 additions and 3 deletions

View File

@@ -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: