rtpdec_h264: Free old extradata before clearing the pointer
[ffmpeg.git] / libavformat / rtpdec_h264.c
index 784c5ec1c4699941edc6f5481a48c45224d49ad9..6efab54a29db152b6d2ee46c88385f1faba17708 100644 (file)
@@ -114,7 +114,7 @@ static int sdp_parse_fmtp_config_h264(AVStream *stream,
         }
     } else if (!strcmp(attr, "sprop-parameter-sets")) {
         codec->extradata_size = 0;
-        codec->extradata      = NULL;
+        av_freep(&codec->extradata);
 
         while (*value) {
             char base64packet[1024];