[Cin] "workaround_bugs=1" for ffmpeg decode

Andrew Randrianasulu randrianasulu at gmail.com
Sun Jul 11 20:36:06 CEST 2021


I run into some cool but unwanted image distortion while playing back and
forth sample file

~/matrixbench_highdivx_ac3.avi from samples.mplayerhq.hu

sadly, setting this avctx flag doesn't fix artefacts, but I send it out
anyway because someone might run into buggy early encode requiring this
workaround variable to be set... I think you also can set it via opts file,
but not tested this (because for me workaround does not improve image
quality after few fast forward/fast backwards)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210711/5d1330e8/attachment.htm>
-------------- next part --------------
diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C
index ec0640a5..b863b8b3 100644
--- a/cinelerra-5.1/cinelerra/ffmpeg.C
+++ b/cinelerra-5.1/cinelerra/ffmpeg.C
@@ -433,6 +433,7 @@ int FFStream::decode_activate()
 				avcodec_parameters_to_context(avctx, st->codecpar);
 				if( !av_dict_get(copts, "threads", NULL, 0) )
 					avctx->thread_count = ffmpeg->ff_cpus();
+				avctx->workaround_bugs = FF_BUG_AUTODETECT;
 				ret = avcodec_open2(avctx, decoder, &copts);
 			}
 			AVFrame *hw_frame = 0;


More information about the Cin mailing list