avformat/movenc: use av_freep() instead of av_free() except for local variables befor...
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 22 Aug 2013 22:29:56 +0000 (00:29 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 22 Aug 2013 22:31:15 +0000 (00:31 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/movenc.c

index 13ffa24..ecf57a5 100644 (file)
@@ -3984,7 +3984,7 @@ static int mov_write_trailer(AVFormatContext *s)
     }
 
     if (mov->chapter_track) {
     }
 
     if (mov->chapter_track) {
-        av_free(mov->tracks[mov->chapter_track].enc->extradata);
+        av_freep(&mov->tracks[mov->chapter_track].enc->extradata);
         av_freep(&mov->tracks[mov->chapter_track].enc);
     }
 
         av_freep(&mov->tracks[mov->chapter_track].enc);
     }
 
@@ -4007,7 +4007,7 @@ static int mov_write_trailer(AVFormatContext *s)
         av_freep(&mov->tracks[i].frag_info);
 
         if (mov->tracks[i].vos_len)
         av_freep(&mov->tracks[i].frag_info);
 
         if (mov->tracks[i].vos_len)
-            av_free(mov->tracks[i].vos_data);
+            av_freep(&mov->tracks[i].vos_data);
     }
 
     av_freep(&mov->tracks);
     }
 
     av_freep(&mov->tracks);