changeset 1457:5ea71a7f06fc libavformat

Don't need to check for NULL before av_free(). And don't need to memset(0) the no more used priv_data.
author aurel
date Mon, 06 Nov 2006 23:57:34 +0000
parents 34d0d965a0d0
children 7d13d9e4d783
files matroska.c
diffstat 1 files changed, 0 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/matroska.c	Mon Nov 06 23:52:10 2006 +0000
+++ b/matroska.c	Mon Nov 06 23:57:34 2006 +0000
@@ -2609,11 +2609,8 @@
     MatroskaDemuxContext *matroska = s->priv_data;
     int n = 0;
 
-    if (matroska->writing_app)
         av_free(matroska->writing_app);
-    if (matroska->muxing_app)
         av_free(matroska->muxing_app);
-    if (matroska->index)
         av_free(matroska->index);
 
     if (matroska->packets != NULL) {
@@ -2626,22 +2623,15 @@
 
     for (n = 0; n < matroska->num_tracks; n++) {
         MatroskaTrack *track = matroska->tracks[n];
-        if (track->codec_id)
             av_free(track->codec_id);
-        if (track->codec_name)
             av_free(track->codec_name);
-        if (track->codec_priv)
             av_free(track->codec_priv);
-        if (track->name)
             av_free(track->name);
-        if (track->language)
             av_free(track->language);
 
         av_free(track);
     }
 
-    memset(matroska, 0, sizeof(MatroskaDemuxContext));
-
     return 0;
 }