Anton Khirnov:
> Quoting Andreas Rheinhardt (2024-03-24 11:19:19)
>> Anton Khirnov:
>>> Quoting Andreas Rheinhardt (2024-03-23 15:11:59)
>>>> 1. The earlier code would just work in case the user used a smaller
>>>> number of elements for the matrices if these matrices were not used at
>>>> all (which happens for the majority of encoders). This is no longer true
>>>> with this patch.
>>>
>>> So?
>>>
>>
>> It means there is a scenario where you break something.
> 
> There is no way for the caller to know whether, and how much, will lavc
> read from those tables, so it's invalid API use.
> 

Incorrect: Given that these fields do not a length field, it is legal to
put pointers to matrices of arbitrary length in the relevant
AVCodecContext field. Just because the current code presumes this to
have at least 64 elements for certain mpegvideo encoders and just
because there are no other encoders using different values does not make
it illegal.
The reason we are in this predicament is of course that the API itself
is broken.

- Andreas

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to