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:
@@ -1954,17 +1954,6 @@ static int open_demux_for_component(AVFormatContext *s, struct representation *p
|
||||
|
||||
// copy disposition
|
||||
st->disposition = ist->disposition;
|
||||
|
||||
// copy side data
|
||||
for (int i = 0; i < ist->nb_side_data; i++) {
|
||||
const AVPacketSideData *sd_src = &ist->side_data[i];
|
||||
uint8_t *dst_data;
|
||||
|
||||
dst_data = av_stream_new_side_data(st, sd_src->type, sd_src->size);
|
||||
if (!dst_data)
|
||||
return AVERROR(ENOMEM);
|
||||
memcpy(dst_data, sd_src->data, sd_src->size);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user