avformat/xmv: use av_freep() to avoid leaving stale extradata pointer
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 15 Dec 2014 14:47:54 +0000 (15:47 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 15 Dec 2014 14:47:54 +0000 (15:47 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/xmv.c

index 6eac4d2..01817dc 100644 (file)
@@ -381,7 +381,7 @@ static int xmv_process_packet_header(AVFormatContext *s)
                 av_assert0(xmv->video.stream_index < s->nb_streams);
 
                 if (vst->codec->extradata_size < 4) {
-                    av_free(vst->codec->extradata);
+                    av_freep(&vst->codec->extradata);
 
                     ff_alloc_extradata(vst->codec, 4);
                 }