[FFmpeg-soc] [soc]: r2823 - mxf/mxfenc.c

spyfeng subversion at mplayerhq.hu
Sat Jul 19 04:57:55 CEST 2008


Author: spyfeng
Date: Sat Jul 19 04:57:54 2008
New Revision: 2823

Log:
only package == SourcePackage, we should malloc free for track_number_sign


Modified:
   mxf/mxfenc.c

Modified: mxf/mxfenc.c
==============================================================================
--- mxf/mxfenc.c	(original)
+++ mxf/mxfenc.c	Sat Jul 19 04:57:54 2008
@@ -501,9 +501,11 @@ static int mxf_write_package(AVFormatCon
         return -1;
 
     // malloc memory for track number sign
-    mxf->track_number_sign = av_mallocz(sizeof(mxf_essence_element_key)/sizeof(MXFEssenceElementKey));
-    if (!mxf->track_number_sign)
-        return -1;
+    if (type == SourcePackage) {
+        mxf->track_number_sign = av_mallocz(sizeof(mxf_essence_element_key)/sizeof(MXFEssenceElementKey));
+        if (!mxf->track_number_sign)
+            return -1;
+    }
 
     // malloc memory for essence element key of each track
     mxf->track_essence_element_key = av_mallocz(s->nb_streams * sizeof(UID));



More information about the FFmpeg-soc mailing list