diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-06-05 07:02:53 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:29 -0300 |
commit | 09b5d3fb44ae1036700f80c8c80b15e9074c58c3 (patch) | |
tree | a89932ad3a2b8050c6fc3f93715bfb3a31dab5c8 /libavcodec | |
parent | f423497b455da06c1337846902c770028760e094 (diff) | |
download | ffmpeg-09b5d3fb44ae1036700f80c8c80b15e9074c58c3.tar.gz |
lavc: deprecate channel count/layout changing side data
They are incompatible with the new channel layout scheme and no decoder
uses them.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/decode.c | 4 | ||||
-rw-r--r-- | libavcodec/packet.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 7423a177c7..48a953da5c 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -91,6 +91,8 @@ static int apply_param_change(AVCodecContext *avctx, const AVPacket *avpkt) flags = bytestream_get_le32(&data); size -= 4; +#if FF_API_OLD_CHANNEL_LAYOUT +FF_DISABLE_DEPRECATION_WARNINGS if (flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT) { if (size < 4) goto fail; @@ -109,6 +111,8 @@ static int apply_param_change(AVCodecContext *avctx, const AVPacket *avpkt) avctx->channel_layout = bytestream_get_le64(&data); size -= 8; } +FF_ENABLE_DEPRECATION_WARNINGS +#endif if (flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE) { if (size < 4) goto fail; diff --git a/libavcodec/packet.h b/libavcodec/packet.h index 4a349fe051..0c3729f32c 100644 --- a/libavcodec/packet.h +++ b/libavcodec/packet.h @@ -447,8 +447,13 @@ typedef struct AVPacketList { #define AV_PKT_FLAG_DISPOSABLE 0x0010 enum AVSideDataParamChangeFlags { +#if FF_API_OLD_CHANNEL_LAYOUT + /** + * @deprecated those are not used by any decoder + */ AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001, AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002, +#endif AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 0x0004, AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 0x0008, }; |