[FFmpeg-devel] [PATCH 28/39] lavc/ffv1dec: fix races in accessing FFV1SliceContext.slice_damaged

Michael Niedermayer michael at niedermayer.cc
Wed Jul 17 23:51:56 EEST 2024


On Tue, Jul 16, 2024 at 07:11:43PM +0200, Anton Khirnov wrote:
> That variable is shared between frame threads in the same defective way
> described in the previous commit. Fix it by adding a RefStruct-managed
> arrays of flags that is propagated across frame threads in the standard
> manner.
> 
> Remove now-unused FFV1Context.fsrc
> ---
>  libavcodec/ffv1.c    |  2 ++
>  libavcodec/ffv1.h    |  3 ++-
>  libavcodec/ffv1dec.c | 24 ++++++++++--------------
>  3 files changed, 14 insertions(+), 15 deletions(-)

breaks error handling
and introduces a race

try any of the files from:
https://samples.ffmpeg.org/avi/ffv1/

./ffmpeg  -i ffv1.3-01ec.avi -f crc -
the results are vissually worse, and differ from run to run

also
./ffmpeg -thread_type slice -i ffv1.3-01ec.avi -f crc -
has issues, its not just the default

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240717/0ef6fe3a/attachment.sig>


More information about the ffmpeg-devel mailing list