diff --git a/libavcodec/dirac_parser.c b/libavcodec/dirac_parser.c
index 4119e3b..8b7c55e 100644
|
a
|
b
|
static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx,
|
| 139 | 139 | void *new_buffer = |
| 140 | 140 | av_fast_realloc(pc->buffer, &pc->buffer_size, |
| 141 | 141 | pc->index + (*buf_size - pc->sync_offset)); |
| | 142 | if (!new_buffer) |
| | 143 | return AVERROR(ENOMEM); |
| 142 | 144 | pc->buffer = new_buffer; |
| 143 | 145 | memcpy(pc->buffer + pc->index, (*buf + pc->sync_offset), |
| 144 | 146 | *buf_size - pc->sync_offset); |
| … |
… |
static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx,
|
| 149 | 151 | DiracParseUnit pu1, pu; |
| 150 | 152 | void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, |
| 151 | 153 | pc->index + next); |
| | 154 | if (!new_buffer) |
| | 155 | return AVERROR(ENOMEM); |
| 152 | 156 | pc->buffer = new_buffer; |
| 153 | 157 | memcpy(pc->buffer + pc->index, *buf, next); |
| 154 | 158 | pc->index += next; |