repositories
/
deb_ffmpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Debian version 2.5.0~trusty1.1
[deb_ffmpeg.git]
/
ffmpeg
/
libavcodec
/
dirac_parser.c
diff --git
a/ffmpeg/libavcodec/dirac_parser.c
b/ffmpeg/libavcodec/dirac_parser.c
index 4119e3b66000fb07ac7d5ac0aacb25afad66506d..45ded5a7795967b2cfc326ed303a172785bde214 100644
(file)
--- a/
ffmpeg/libavcodec/dirac_parser.c
+++ b/
ffmpeg/libavcodec/dirac_parser.c
@@
-139,6
+139,8
@@
static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx,
void *new_buffer =
av_fast_realloc(pc->buffer, &pc->buffer_size,
pc->index + (*buf_size - pc->sync_offset));
void *new_buffer =
av_fast_realloc(pc->buffer, &pc->buffer_size,
pc->index + (*buf_size - pc->sync_offset));
+ if (!new_buffer)
+ return AVERROR(ENOMEM);
pc->buffer = new_buffer;
memcpy(pc->buffer + pc->index, (*buf + pc->sync_offset),
*buf_size - pc->sync_offset);
pc->buffer = new_buffer;
memcpy(pc->buffer + pc->index, (*buf + pc->sync_offset),
*buf_size - pc->sync_offset);
@@
-149,6
+151,8
@@
static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx,
DiracParseUnit pu1, pu;
void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size,
pc->index + next);
DiracParseUnit pu1, pu;
void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size,
pc->index + next);
+ if (!new_buffer)
+ return AVERROR(ENOMEM);
pc->buffer = new_buffer;
memcpy(pc->buffer + pc->index, *buf, next);
pc->index += next;
pc->buffer = new_buffer;
memcpy(pc->buffer + pc->index, *buf, next);
pc->index += next;
@@
-247,7
+251,7
@@
static void dirac_parse_close(AVCodecParserContext *s)
DiracParseContext *pc = s->priv_data;
if (pc->buffer_size > 0)
DiracParseContext *pc = s->priv_data;
if (pc->buffer_size > 0)
- av_free
(
pc->buffer);
+ av_free
p(&
pc->buffer);
}
AVCodecParser ff_dirac_parser = {
}
AVCodecParser ff_dirac_parser = {