diff options
author | James Almer <jamrial@gmail.com> | 2023-07-16 17:57:26 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2023-10-06 10:03:57 -0300 |
commit | 5432d2aacad5fa7420fe2d9369ed061d521e92d6 (patch) | |
tree | 9c1bf0307108a16ed652261d590042e5944e288d /libavformat/dovi_isom.c | |
parent | 21d7cc6fa9a26e94965fa71b25655d07568450fe (diff) |
avformat/avformat: use the side data from AVStream.codecpar
Deprecate AVStream.side_data and its helpers in favor of the AVStream's
codecpar.coded_side_data.
This will considerably simplify the propagation of global side data to decoders
and from encoders. Instead of having to do it inside packets, it will be
available during init().
Global and frame specific side data will therefore be distinct.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/dovi_isom.c')
-rw-r--r-- | libavformat/dovi_isom.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavformat/dovi_isom.c b/libavformat/dovi_isom.c index c8fdf566e4..ef7ab1b6d9 100644 --- a/libavformat/dovi_isom.c +++ b/libavformat/dovi_isom.c @@ -34,7 +34,6 @@ int ff_isom_parse_dvcc_dvvc(void *logctx, AVStream *st, uint32_t buf; AVDOVIDecoderConfigurationRecord *dovi; size_t dovi_size; - int ret; if (size > (1 << 30) || size < 4) return AVERROR_INVALIDDATA; @@ -64,11 +63,10 @@ int ff_isom_parse_dvcc_dvvc(void *logctx, AVStream *st, dovi->dv_bl_signal_compatibility_id = 0; } - ret = av_stream_add_side_data(st, AV_PKT_DATA_DOVI_CONF, - (uint8_t *)dovi, dovi_size); - if (ret < 0) { + if (!av_packet_side_data_add(&st->codecpar->coded_side_data, &st->codecpar->nb_coded_side_data, + AV_PKT_DATA_DOVI_CONF, (uint8_t *)dovi, dovi_size, 0)) { av_free(dovi); - return ret; + return AVERROR(ENOMEM); } av_log(logctx, AV_LOG_TRACE, "DOVI in dvcC/dvvC/dvwC box, version: %d.%d, profile: %d, level: %d, " |