[FFmpeg-devel] [PATCH v3] Add avpriv_slicethread_create2() and avpriv_slicethread_execute2(), make execute() and execute2() return FFMIN() of thread return codes
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Mon Sep 26 17:01:53 EEST 2022
Andreas Rheinhardt:
> Tomas Härdin:
>> diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
>> index abeebbb002..50e73c86fa 100644
>> --- a/libswscale/swscale_internal.h
>> +++ b/libswscale/swscale_internal.h
>> @@ -306,7 +306,7 @@ typedef struct SwsContext {
>>
>> AVSliceThread *slicethread;
>> struct SwsContext **slice_ctx;
>> - int *slice_err;
>> + attribute_deprecated int *slice_err; ///< @deprecated Not used any more. Removing it would require a bunch of asm to be rewritten.
>> int nb_slice_ctx;
>>
>> // values passed to current sws_receive_slice() call
>
> What asm would need to be rewritten? (I presume that no asm code
> accesses slice_err, because doing so would be insane and because you
> already stop allocating slice_err in this patch. Is it because of
> hardcoded offsets of other fields? Which fields? Why is there no
> corresponding AV_CHECK_OFFSET for them?)
>
> Anyway, we don't deprecate internal fields; if we have to keep them
> around for ABI compatibility, we wrap them in #if LIBFOO_VERSION_MAJOR <
> BAR.
>
Ok, just moving this led me to the issue: An assert in line 751 of
libswscale/x86/swscale.c.
This is actually very frightening. A dev who does not use x86 could
break x86 any time.
- Andreas
More information about the ffmpeg-devel
mailing list