summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_mpeg4.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rtpdec_mpeg4.c')
-rw-r--r--libavformat/rtpdec_mpeg4.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/rtpdec_mpeg4.c b/libavformat/rtpdec_mpeg4.c
index 137dbd2613..5498d1c46b 100644
--- a/libavformat/rtpdec_mpeg4.c
+++ b/libavformat/rtpdec_mpeg4.c
@@ -111,8 +111,7 @@ static int parse_fmtp_config(AVCodecContext * codec, char *value)
{
/* decode the hexa encoded parameter */
int len = ff_hex_to_data(NULL, value);
- if (codec->extradata)
- av_free(codec->extradata);
+ av_free(codec->extradata);
codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
if (!codec->extradata)
return AVERROR(ENOMEM);