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

index 53921f2..6ab3e64 100644 (file)
@@ -104,7 +104,7 @@ static int parse_fmtp_config(AVCodecContext *codec, char *value)
 {
     /* decode the hexa encoded parameter */
     int len = ff_hex_to_data(NULL, value);
-    av_free(codec->extradata);
+    av_freep(&codec->extradata);
     if (ff_alloc_extradata(codec, len))
         return AVERROR(ENOMEM);
     ff_hex_to_data(codec->extradata, value);