Commit 0051e3c2 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/rtpdec_mpeg4: Use av_freep() to avoid leaving stale extradata pointer

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c116befc
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment