[FFmpeg-devel] [PATCH 12/13] avformat/demux: stop copying the internal AVCodecContext coded_side_data
James Almer
jamrial at gmail.com
Thu Jul 20 23:34:14 EEST 2023
It's no longer needed
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavformat/demux.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/libavformat/demux.c b/libavformat/demux.c
index 7253196a82..24bc8fce2a 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -2432,19 +2432,6 @@ static int extract_extradata(FFFormatContext *si, AVStream *st, const AVPacket *
return 0;
}
-static int add_coded_side_data(AVStream *st, AVCodecContext *avctx)
-{
- for (int i = 0; i < avctx->nb_coded_side_data; i++) {
- const AVPacketSideData *const sd_src = &avctx->coded_side_data[i];
- AVPacketSideData *sd_dst = av_packet_new_side_data_to_set(&st->codecpar->side_data_set,
- sd_src->type, sd_src->size);
- if (!sd_dst)
- return AVERROR(ENOMEM);
- memcpy(sd_dst->data, sd_src->data, sd_src->size);
- }
- return 0;
-}
-
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
{
FFFormatContext *const si = ffformatcontext(ic);
@@ -2972,9 +2959,6 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
ret = avcodec_parameters_from_context(st->codecpar, sti->avctx);
if (ret < 0)
goto find_stream_info_err;
- ret = add_coded_side_data(st, sti->avctx);
- if (ret < 0)
- goto find_stream_info_err;
}
#if FF_API_AVSTREAM_SIDE_DATA
--
2.41.0
More information about the ffmpeg-devel
mailing list