diff options
author | James Almer <jamrial@gmail.com> | 2023-07-16 18:56:17 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2023-10-06 10:11:00 -0300 |
commit | 3fd37b52680afc30d17bf438793ce93264592d56 (patch) | |
tree | 546102639ecc71cdac2b749eeff0a94055687bc0 /fftools/ffmpeg_mux_init.c | |
parent | e500eb5a95afefb4a012814b7f8af2dd6869a641 (diff) | |
download | ffmpeg-3fd37b52680afc30d17bf438793ce93264592d56.tar.gz |
fftools/ffmpeg: stop using AVStream.side_data
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'fftools/ffmpeg_mux_init.c')
-rw-r--r-- | fftools/ffmpeg_mux_init.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 9d6f442068..c2385fdcf2 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -1045,24 +1045,28 @@ static int streamcopy_init(const Muxer *mux, OutputStream *ost) } } - for (int i = 0; i < ist->st->nb_side_data; i++) { - const AVPacketSideData *sd_src = &ist->st->side_data[i]; - uint8_t *dst_data; - - dst_data = av_stream_new_side_data(ost->st, sd_src->type, sd_src->size); - if (!dst_data) { + for (int i = 0; i < ist->st->codecpar->nb_coded_side_data; i++) { + const AVPacketSideData *sd_src = &ist->st->codecpar->coded_side_data[i]; + AVPacketSideData *sd_dst; + + sd_dst = av_packet_side_data_new(&ost->st->codecpar->coded_side_data, + &ost->st->codecpar->nb_coded_side_data, + sd_src->type, sd_src->size, 0); + if (!sd_dst) { ret = AVERROR(ENOMEM); goto fail; } - memcpy(dst_data, sd_src->data, sd_src->size); + memcpy(sd_dst->data, sd_src->data, sd_src->size); } #if FFMPEG_ROTATION_METADATA if (ost->rotate_overridden) { - uint8_t *sd = av_stream_new_side_data(ost->st, AV_PKT_DATA_DISPLAYMATRIX, - sizeof(int32_t) * 9); + AVPacketSideData *sd = av_packet_side_data_new(&ost->st->codecpar->coded_side_data, + &ost->st->codecpar->nb_coded_side_data, + AV_PKT_DATA_DISPLAYMATRIX, + sizeof(int32_t) * 9, 0); if (sd) - av_display_rotation_set((int32_t *)sd, -ost->rotate_override_value); + av_display_rotation_set((int32_t *)sd->data, -ost->rotate_override_value); } #endif |