diff mbox series

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

Message ID 20230904150411.56777-17-jamrial@gmail.com
State New
Headers show
Series AVCodecContext and AVCodecParameters side data | expand

Commit Message

James Almer Sept. 4, 2023, 3:04 p.m. UTC
It's no longer needed

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/demux.c | 16 ----------------
 1 file changed, 16 deletions(-)
diff mbox series

Patch

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;