diff options
author | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2007-07-30 13:58:17 +0000 |
---|---|---|
committer | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2007-07-30 13:58:17 +0000 |
commit | 6654296c309a60ce803b7e1c70edfd3ea09ee8c0 (patch) | |
tree | 495396bedb2ecd6972cc063eadcbcae1ff38ceba | |
parent | bffcf2ebbf7c5a4a3580086d3e4f9020646f855d (diff) | |
download | ffmpeg-6654296c309a60ce803b7e1c70edfd3ea09ee8c0.tar.gz |
Handle malloc failure
Originally committed as revision 9833 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/atrac3.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index ab54c5708a..88d31d4ab1 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -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; } |