ffmpegdec: try to fix overread on rewind/forward play

This commit is contained in:
Jacek Jendrzej
2020-01-22 09:48:36 +01:00
parent 6704e0de9f
commit 33ab251a3b

View File

@@ -326,7 +326,11 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state,
next_skip_pts = pts + skip/4;
seek_flags = 0;
}
av_seek_frame(avc, best_stream, pts, seek_flags);
int result = av_seek_frame(avc, best_stream, pts, seek_flags);
if (result < 0) {
fprintf(stderr,"av_seek_frame error\n");
}
avcodec_flush_buffers(c);
// if a custom value was set we only jump once
if (actSecsToSkip != 0) {
*state=PLAY;