Ticket #3996: patchdiracoom.diff

File patchdiracoom.diff, 629 bytes (added by Carl Eugen Hoyos, 12 years ago)
  • libavcodec/dirac_parser.c

    diff --git a/libavcodec/dirac_parser.c b/libavcodec/dirac_parser.c
    index 4119e3b..62c0024 100644
    a b static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx,  
    139139        void *new_buffer =
    140140            av_fast_realloc(pc->buffer, &pc->buffer_size,
    141141                            pc->index + (*buf_size - pc->sync_offset));
     142        if (!new_buffer)
     143            return AVERROR(ENOMEM);
    142144        pc->buffer = new_buffer;
    143145        memcpy(pc->buffer + pc->index, (*buf + pc->sync_offset),
    144146               *buf_size - pc->sync_offset);