oggdec: Fix memory leak in setting up vorbis headers
Originally committed as revision 22460 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
8f8320d7c3
commit
2ac41150c0
@ -153,6 +153,7 @@ fixup_vorbis_headers(AVFormatContext * as, struct oggvorbis_private *priv,
|
|||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
memcpy(&ptr[offset], priv->packet[i], priv->len[i]);
|
memcpy(&ptr[offset], priv->packet[i], priv->len[i]);
|
||||||
offset += priv->len[i];
|
offset += priv->len[i];
|
||||||
|
av_freep(&priv->packet[i]);
|
||||||
}
|
}
|
||||||
*buf = av_realloc(*buf, offset + FF_INPUT_BUFFER_PADDING_SIZE);
|
*buf = av_realloc(*buf, offset + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
return offset;
|
return offset;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user