]> git.sesse.net Git - ffmpeg/commitdiff
fftools/ffmpeg: Fix forward CPB props in to out
authorNicolas Gaullier <nicolas.gaullier@cji.paris>
Thu, 19 Dec 2019 16:43:21 +0000 (17:43 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 21 Dec 2019 13:46:12 +0000 (14:46 +0100)
CPB side_data is copied when stream-copying (see init_output_stream_streamcopy()),
but it shall not be copied when the stream is decoded.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
fftools/ffmpeg.c

index 27f68933f805771d7ff41579150f687370bc7dbf..36c207653bfb2e9359ffd965dddb169a2b5b0ddf 100644 (file)
@@ -3562,12 +3562,14 @@ static int init_output_stream(OutputStream *ost, char *error, int error_len)
             int i;
             for (i = 0; i < ist->st->nb_side_data; i++) {
                 AVPacketSideData *sd = &ist->st->side_data[i];
+                if (sd->type != AV_PKT_DATA_CPB_PROPERTIES) {
                 uint8_t *dst = av_stream_new_side_data(ost->st, sd->type, sd->size);
                 if (!dst)
                     return AVERROR(ENOMEM);
                 memcpy(dst, sd->data, sd->size);
                 if (ist->autorotate && sd->type == AV_PKT_DATA_DISPLAYMATRIX)
                     av_display_rotation_set((uint32_t *)dst, 0);
+                }
             }
         }