[FFmpeg-devel] [PATCH v2 1/7] fftools/ffmpeg: Fix forward CPB props in to out

2019-12-19 Thread Nicolas Gaullier
CPB side_data is copied when stream-copying (see 
init_output_stream_streamcopy()),
but it shall not be copied when the stream is decoded.
---
 fftools/ffmpeg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 27f68933f8..36c207653b 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -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);
+}
 }
 }
 
-- 
2.14.1.windows.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH v2 1/7] fftools/ffmpeg: Fix forward CPB props in to out

2019-12-21 Thread Michael Niedermayer
On Thu, Dec 19, 2019 at 05:43:21PM +0100, Nicolas Gaullier wrote:
> CPB side_data is copied when stream-copying (see 
> init_output_stream_streamcopy()),
> but it shall not be copied when the stream is decoded.
> ---
>  fftools/ffmpeg.c | 2 ++
>  1 file changed, 2 insertions(+)

will apply

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".