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>
This commit is contained in:
@@ -2187,7 +2187,6 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
|
||||
uint32_t buf;
|
||||
AVDOVIDecoderConfigurationRecord *dovi;
|
||||
size_t dovi_size;
|
||||
int ret;
|
||||
int dependency_pid;
|
||||
|
||||
if (desc_end - *pp < 4) // (8 + 8 + 7 + 6 + 1 + 1 + 1) / 8
|
||||
@@ -2218,11 +2217,12 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
|
||||
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(fc, AV_LOG_TRACE, "DOVI, version: %d.%d, profile: %d, level: %d, "
|
||||
|
||||
Reference in New Issue
Block a user