decoder/ffmpeg: flush the codec after seeking
Let the codec start with fresh buffers. This should fix the remaining seeking issues.
This commit is contained in:
parent
ce35ba9ac9
commit
2ed870c854
@ -459,8 +459,10 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
|
|||||||
if (av_seek_frame(format_context, audio_stream, where,
|
if (av_seek_frame(format_context, audio_stream, where,
|
||||||
AV_TIME_BASE) < 0)
|
AV_TIME_BASE) < 0)
|
||||||
decoder_seek_error(decoder);
|
decoder_seek_error(decoder);
|
||||||
else
|
else {
|
||||||
|
avcodec_flush_buffers(codec_context);
|
||||||
decoder_command_finished(decoder);
|
decoder_command_finished(decoder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} while (cmd != DECODE_COMMAND_STOP);
|
} while (cmd != DECODE_COMMAND_STOP);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user