matroskadec: use av_freep(&x) instead of av_free(x);x=NULL
authorAurelien Jacobs <aurel@gnuage.org>
Wed, 6 Aug 2008 00:21:10 +0000 (00:21 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Wed, 6 Aug 2008 00:21:10 +0000 (00:21 +0000)
Originally committed as revision 14633 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/matroskadec.c

index 23fea47..d7a1e39 100644 (file)
@@ -1304,8 +1304,7 @@ static void matroska_clear_queue(MatroskaDemuxContext *matroska)
             av_free_packet(matroska->packets[n]);
             av_free(matroska->packets[n]);
         }
-        av_free(matroska->packets);
-        matroska->packets = NULL;
+        av_freep(&matroska->packets);
         matroska->num_packets = 0;
     }
 }