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>
pull/30/merge
Martin Storsjö 13 years ago
parent 3c148703f6
commit b97d21e4d6
  1. 2
      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];

Loading…
Cancel
Save