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 /libavformat/utils.c | |
parent | f423497b455da06c1337846902c770028760e094 (diff) |
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 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index ca61a97759..3c775cf6c6 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1329,6 +1329,9 @@ int ff_add_param_change(AVPacket *pkt, int32_t channels, uint8_t *data; if (!pkt) return AVERROR(EINVAL); + +#if FF_API_OLD_CHANNEL_LAYOUT +FF_DISABLE_DEPRECATION_WARNINGS if (channels) { size += 4; flags |= AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT; @@ -1337,6 +1340,8 @@ int ff_add_param_change(AVPacket *pkt, int32_t channels, size += 8; flags |= AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT; } +FF_ENABLE_DEPRECATION_WARNINGS +#endif if (sample_rate) { size += 4; flags |= AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE; @@ -1349,10 +1354,14 @@ int ff_add_param_change(AVPacket *pkt, int32_t channels, if (!data) return AVERROR(ENOMEM); bytestream_put_le32(&data, flags); +#if FF_API_OLD_CHANNEL_LAYOUT +FF_DISABLE_DEPRECATION_WARNINGS if (channels) bytestream_put_le32(&data, channels); if (channel_layout) bytestream_put_le64(&data, channel_layout); +FF_ENABLE_DEPRECATION_WARNINGS +#endif if (sample_rate) bytestream_put_le32(&data, sample_rate); if (width || height) { |