[FFmpeg-devel] [PATCH 16/17] avformat/demux: stop copying the internal AVCodecContext coded_side_data

James Almer jamrial at gmail.com
Mon Sep 4 18:04:09 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 d7e34aad97..4fff483d12 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -2433,19 +2433,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_side_data_set_new(&st->codecpar->side_data,
-                                                               sd_src->type, sd_src->size, 0);
-        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);
@@ -2971,9 +2958,6 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
 
         if (sti->avctx_inited) {
             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;
 
-- 
2.42.0



More information about the ffmpeg-devel mailing list