[FFmpeg-cvslog] rtpdec_h264: Free old extradata before clearing the pointer
Martin Storsjö
git at videolan.org
Sun May 6 22:18:58 CEST 2012
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Sat May 5 16:55:20 2012 +0300| [b97d21e4d6813498f458777ff42c7eab1eed3adf] | committer: Martin Storsjö
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 at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b97d21e4d6813498f458777ff42c7eab1eed3adf
---
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 784c5ec..6efab54 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];
More information about the ffmpeg-cvslog
mailing list