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>
This commit is contained in:
Martin Storsjö 2012-05-05 16:55:20 +03:00
parent 3c148703f6
commit b97d21e4d6
1 changed files with 1 additions and 1 deletions

View 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];