diff options
author | Martin Storsjö <martin@martin.st> | 2012-05-05 16:55:20 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-05-05 22:11:45 +0300 |
commit | b97d21e4d6813498f458777ff42c7eab1eed3adf (patch) | |
tree | 849a289ca8b6d2f48fc2b9381dea17c9e2d9dd41 | |
parent | 3c148703f61d8862eb623484da1c679d55860148 (diff) | |
download | ffmpeg-b97d21e4d6813498f458777ff42c7eab1eed3adf.tar.gz |
rtpdec_h264: Free old extradata before clearing the pointer
This avoids memory leaks if there actually was some extradata
set before.
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavformat/rtpdec_h264.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c index 784c5ec1c4..6efab54a29 100644 --- a/libavformat/rtpdec_h264.c +++ b/libavformat/rtpdec_h264.c @@ -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]; |