demux_lavf: seek avfc only on seekable streams in drop_buffers
Disc streams are only seekable through the higher-level stream controls, a byte seek on the slave can only fail and log errors. avformat_flush() below already resets the demuxer state.
This commit is contained in:
1 parent
2c8d954d21
commit
b48fb6c86c
1 file changed
+2
-1
+2
-1
@@ -1800,7 +1800,8 @@ static void reset_dovi_split_state(demuxer_t *demuxer)
|
||||
static void demux_drop_buffers_lavf(demuxer_t *demuxer)
|
||||
{
|
||||
lavf_priv_t *priv = demuxer->priv;
|
||||
av_seek_frame(priv->avfc, -1, 0, 1);
|
||||
if (!priv->stream || priv->stream->seekable)
|
||||
av_seek_frame(priv->avfc, -1, 0, 1);
|
||||
demux_flush(demuxer);
|
||||
stream_drop_buffers(priv->stream);
|
||||
avio_flush(priv->avfc->pb);
|
||||
|
||||
Reference in new issue
Block a user