Commit 6654296c authored by Panagiotis Issaris's avatar Panagiotis Issaris

Handle malloc failure

Originally committed as revision 9833 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent bffcf2eb
......@@ -1047,6 +1047,10 @@ static int atrac3_decode_init(AVCodecContext *avctx)
dsputil_init(&dsp, avctx);
q->pUnits = av_mallocz(sizeof(channel_unit)*q->channels);
if (!q->pUnits) {
av_free(q->decoded_bytes_buffer);
return AVERROR(ENOMEM);
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment