Closed umlaeute closed 2 years ago
Similar to https://github.com/x42/harvid/issues/11, xjadeo also fails to build with FFmpeg-5.1 (see the harvid issue for details).
here's a more radical approach, that just unconditionally calls avcodec_flush_buffers() for all ffmpeg-versions:
avcodec_flush_buffers()
--- xjadeo.orig/src/xjadeo/xjadeo.c +++ xjadeo/src/xjadeo/xjadeo.c @@ -575,9 +575,7 @@ seek = av_seek_frame (pFormatCtx, videoStream, fidx[framenumber].seekpts, AVSEEK_FLAG_BACKWARD); } - if (pCodecCtx->codec->flush) { - avcodec_flush_buffers (pCodecCtx); - } + avcodec_flush_buffers (pCodecCtx); if (seek < 0) { if (!want_quiet) @@ -915,9 +913,7 @@ error |= 16; break; } - if (pCodecCtx->codec->flush) { - avcodec_flush_buffers (pCodecCtx); - } + avcodec_flush_buffers (pCodecCtx); int err = 0; int bailout = 100; @@ -1053,9 +1049,7 @@ printf("NOBYTE 2\n"); break; } - if (pCodecCtx->codec->flush) { - avcodec_flush_buffers (pCodecCtx); - } + avcodec_flush_buffers (pCodecCtx); int64_t pts = AV_NOPTS_VALUE; while (!got_pic) { @@ -1118,9 +1112,7 @@ } else { av_seek_frame (pFormatCtx, videoStream, fidx[i].seekpts, AVSEEK_FLAG_BACKWARD); } - if (pCodecCtx->codec->flush) { - avcodec_flush_buffers (pCodecCtx); - } + avcodec_flush_buffers (pCodecCtx); while (!got_pic) { if (av_read_frame (pFormatCtx, &packet) < 0) { @@ -1192,9 +1184,7 @@ } av_seek_frame (pFormatCtx, videoStream, 0, AVSEEK_FLAG_BACKWARD); - if (pCodecCtx->codec->flush) { - avcodec_flush_buffers (pCodecCtx); - } + avcodec_flush_buffers (pCodecCtx); if (!error) { scan_complete = 1; }
Similar to https://github.com/x42/harvid/issues/11, xjadeo also fails to build with FFmpeg-5.1 (see the harvid issue for details).
here's a more radical approach, that just unconditionally calls
avcodec_flush_buffers()
for all ffmpeg-versions: