ffmpegdec: try to fix overread on rewind/forward play

Origin commit data
------------------
Commit: af8a7e10a5
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-01-23 (Thu, 23 Jan 2020)
This commit is contained in:
Jacek Jendrzej
2020-01-23 21:15:51 +01:00
committed by vanhofen
parent fb42435f44
commit 4fb0bd9247

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;