[FFmpeg-cvslog] Fix copying extradata to codec in mxfdec.c

Nigel Touati-Evans git at videolan.org
Thu Jun 27 14:22:52 CEST 2013


ffmpeg | branch: release/1.1 | Nigel Touati-Evans <nigel.touatievans at gmail.com> | Thu Jun 27 12:28:43 2013 +0100| [e2dcc4452dada1633c54601e8073b1ed84ff4b7e] | committer: Carl Eugen Hoyos

Fix copying extradata to codec in mxfdec.c

The code that copies any extradata from the MXFDescriptor to the codec does
not set the size, which it should otherwise the copied data is useless.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 42bd0cd21ae68abef4436cc97d67f592be38d3e3)

Conflicts:
	libavformat/mxfdec.c

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

 libavformat/mxfdec.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index bb5f4a7..88cfd5d 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1591,8 +1591,10 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
         }
         if (descriptor->extradata) {
             st->codec->extradata = av_mallocz(descriptor->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
-            if (st->codec->extradata)
+            if (st->codec->extradata) {
                 memcpy(st->codec->extradata, descriptor->extradata, descriptor->extradata_size);
+                st->codec->extradata_size = descriptor->extradata_size;
+            }
         } else if(st->codec->codec_id == CODEC_ID_H264) {
             ff_generate_avci_extradata(st);
         }



More information about the ffmpeg-cvslog mailing list