You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
Merge commit 'ed9245dba83f9add60f55718b537b0af2105c60e'
* commit 'ed9245dba83f9add60f55718b537b0af2105c60e': oggparsevorbis: check allocations Conflicts: libavformat/oggparsevorbis.c See:033f1644b5
See:84aea80f78
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -193,9 +193,9 @@ struct oggvorbis_private {
|
|||||||
int final_duration;
|
int final_duration;
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned int fixup_vorbis_headers(AVFormatContext *as,
|
static int fixup_vorbis_headers(AVFormatContext *as,
|
||||||
struct oggvorbis_private *priv,
|
struct oggvorbis_private *priv,
|
||||||
uint8_t **buf)
|
uint8_t **buf)
|
||||||
{
|
{
|
||||||
int i, offset, len, err;
|
int i, offset, len, err;
|
||||||
int buf_len;
|
int buf_len;
|
||||||
@@ -204,8 +204,8 @@ static unsigned int fixup_vorbis_headers(AVFormatContext *as,
|
|||||||
len = priv->len[0] + priv->len[1] + priv->len[2];
|
len = priv->len[0] + priv->len[1] + priv->len[2];
|
||||||
buf_len = len + len / 255 + 64;
|
buf_len = len + len / 255 + 64;
|
||||||
ptr = *buf = av_realloc(NULL, buf_len);
|
ptr = *buf = av_realloc(NULL, buf_len);
|
||||||
if (!*buf)
|
if (!ptr)
|
||||||
return 0;
|
return AVERROR(ENOMEM);
|
||||||
memset(*buf, '\0', buf_len);
|
memset(*buf, '\0', buf_len);
|
||||||
|
|
||||||
ptr[0] = 2;
|
ptr[0] = 2;
|
||||||
|
Reference in New Issue
Block a user