[FFmpeg-cvslog] fftools/ffmpeg_enc: stop copying demuxer side data to the muxer

Anton Khirnov git at videolan.org
Thu Mar 28 09:54:57 EET 2024


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Mar 22 21:22:22 2024 +0100| [c9a90c052ab5304474cb6d2409870f1e480755c0] | committer: Anton Khirnov

fftools/ffmpeg_enc: stop copying demuxer side data to the muxer

All side data should be propagated through the trancoding pipeline.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c9a90c052ab5304474cb6d2409870f1e480755c0
---

 fftools/ffmpeg_enc.c | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
index 260af435e9..6161e8e3d5 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -359,29 +359,6 @@ int enc_open(void *opaque, const AVFrame *frame)
         return ret;
     }
 
-    /*
-     * Add global input side data. For now this is naive, and copies it
-     * from the input stream's global side data. All side data should
-     * really be funneled over AVFrame and libavfilter, then added back to
-     * packet side data, and then potentially using the first packet for
-     * global side data.
-     */
-    if (ist) {
-        for (int i = 0; i < ist->st->codecpar->nb_coded_side_data; i++) {
-            AVPacketSideData *sd_src = &ist->st->codecpar->coded_side_data[i];
-            if (sd_src->type != AV_PKT_DATA_CPB_PROPERTIES) {
-                AVPacketSideData *sd_dst = av_packet_side_data_new(&ost->par_in->coded_side_data,
-                                                                   &ost->par_in->nb_coded_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);
-                if (ist->autorotate && sd_src->type == AV_PKT_DATA_DISPLAYMATRIX)
-                    av_display_rotation_set((int32_t *)sd_dst->data, 0);
-            }
-        }
-    }
-
     // copy timebase while removing common factors
     if (ost->st->time_base.num <= 0 || ost->st->time_base.den <= 0)
         ost->st->time_base = av_add_q(ost->enc_ctx->time_base, (AVRational){0, 1});



More information about the ffmpeg-cvslog mailing list