[FFmpeg-devel] [PATCH] diracdec: check if reference could not be allocated

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Wed May 6 00:23:34 CEST 2015


On 06.05.2015 00:00, Timothy Gu wrote:
> On Tue, May 5, 2015 at 2:51 PM Andreas Cadhalpun <
> andreas.cadhalpun at googlemail.com> wrote:
>>
>> +        if (!s->ref_pics[i]) {
>> +            av_log(s->avctx, AV_LOG_ERROR, "Reference could not be
>> allocated\n");
>> +            return -1;
>> +        }
>> +
> 
> 
> AVERROR(ENOMEM)

The problem is not caused by not having enough memory, but by running out
of space in s->all_frames[j]. And anyway, the return code is not propagated:
        if (dirac_decode_picture_header(s))
            return -1;

Best regards,
Andreas



More information about the ffmpeg-devel mailing list