mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
parent
c9f2ec8a34
commit
80ca627abb
1 changed files with 4 additions and 0 deletions
|
|
@ -139,6 +139,8 @@ static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||||
void *new_buffer =
|
void *new_buffer =
|
||||||
av_fast_realloc(pc->buffer, &pc->buffer_size,
|
av_fast_realloc(pc->buffer, &pc->buffer_size,
|
||||||
pc->index + (*buf_size - pc->sync_offset));
|
pc->index + (*buf_size - pc->sync_offset));
|
||||||
|
if (!new_buffer)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
pc->buffer = new_buffer;
|
pc->buffer = new_buffer;
|
||||||
memcpy(pc->buffer + pc->index, (*buf + pc->sync_offset),
|
memcpy(pc->buffer + pc->index, (*buf + pc->sync_offset),
|
||||||
*buf_size - pc->sync_offset);
|
*buf_size - pc->sync_offset);
|
||||||
|
|
@ -149,6 +151,8 @@ static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||||
DiracParseUnit pu1, pu;
|
DiracParseUnit pu1, pu;
|
||||||
void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size,
|
void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size,
|
||||||
pc->index + next);
|
pc->index + next);
|
||||||
|
if (!new_buffer)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
pc->buffer = new_buffer;
|
pc->buffer = new_buffer;
|
||||||
memcpy(pc->buffer + pc->index, *buf, next);
|
memcpy(pc->buffer + pc->index, *buf, next);
|
||||||
pc->index += next;
|
pc->index += next;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue