[FFmpeg-devel] ABI break in 4.3
Michael Niedermayer
michael at niedermayer.cc
Sun Jul 5 02:09:45 EEST 2020
On Sun, Jul 05, 2020 at 12:54:53AM +0200, Jan Engelhardt wrote:
> Greetings.
>
>
> Between ffmpeg-4.2.3 and ffmpeg-4.3, struct AVCodecContext,
> publicly exposed through /usr/include, has been changed thus:
>
> --- avcodec.h 2020-06-11 11:45:16.000000000 +0200
> +++ avcodec.h 2020-07-01 03:45:24.000000000 +0200
> @@ -3370,6 +2334,24 @@ typedef struct AVCodecContext {
> * - encoding: unused
> */
> int discard_damaged_percentage;
> +
> + /**
> + * The number of samples per frame to maximally accept.
> + *
> + * - decoding: set by user
> + * - encoding: set by user
> + */
> + int64_t max_samples;
> +
> + /**
> + * Bit set of AV_CODEC_EXPORT_DATA_* flags, which affects the kind of
> + * metadata exported in frame, packet, or coded stream side data by
> + * decoders and encoders.
> + *
> + * - decoding: set by user
> + * - encoding: set by user
> + */
> + int export_side_data;
> } AVCodecContext;
>
> #if FF_API_CODEC_GET_SET
>
>
> Second, struct AVDCT, which is publicly exposed through /usr/include, has been
> changed:
>
> --- avdct.h 2020-06-11 11:45:16.000000000 +0200
> +++ avdct.h 2020-07-01 03:45:24.000000000 +0200
> @@ -67,6 +67,10 @@ typedef struct AVDCT {
> ptrdiff_t line_size);
>
> int bits_per_sample;
> +
> + void (*get_pixels_unaligned)(int16_t *block /* align 16 */,
> + const uint8_t *pixels,
> + ptrdiff_t line_size);
> } AVDCT;
>
> /**
>
>
> The abidiff(1) utility confirms this situation such:
>
> $ abidiff b42/usr/lib/debug/usr/lib64/libavcodec.so.58.54.100-4.2.3-1.1.x86_64.debug \
> b43/usr/lib/debug/usr/lib64/libavcodec.so.58.91.100-4.3-136.2.x86_64.debug
>
> [...] in pointed to type 'struct AVCodecContext' at avcodec.h:526:1:
> type size changed from 8448 to 8576 (in bits)
> [...]
> underlying type 'struct AVDCT' at avdct.h:29:1 changed:
> type size changed from 896 to 960 (in bits)
>
>
> These struct changes constitute an ABI break, and ABI breaks require SO version
> bumps, but which was not done for 4.3. This is bad.
Quoting the AVCodecContext documentation from FFmpeg 4.2.3
/**
* main external API structure.
* New fields can be added to the end with minor version bumps.
* Removal, reordering and changes to existing fields require a major
* version bump.
* You can use AVOptions (av_opt* / av_set/get*()) to access these fields from user
* applications.
* The name string for AVOptions options matches the associated command line
* parameter name and can be found in libavcodec/options_table.h
* The AVOption/command line parameter names differ in some cases from the C
* structure field names for historic reasons or brevity.
* sizeof(AVCodecContext) must not be used outside libav*.
*/
typedef struct AVCodecContext {
>
> A user has summarily reported crashes through {not a proper bug reporting
> medium} already.
> https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4
have you identified what exactly causes the crashes ?
Thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- 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/20200705/77d3d380/attachment.sig>
More information about the ffmpeg-devel
mailing list