comparison flacdec.c @ 9237:69779b592b9d libavcodec

flacdec: skip frame when allocated data size is too small
author jbr
date Sun, 22 Mar 2009 21:31:23 +0000
parents 7ec90057127a
children 11a79ab2279d
comparison
equal deleted inserted replaced
9236:7ec90057127a 9237:69779b592b9d
691 /* check if allocated data size is large enough for output */ 691 /* check if allocated data size is large enough for output */
692 output_size = s->blocksize * s->channels * (s->is32 ? 4 : 2); 692 output_size = s->blocksize * s->channels * (s->is32 ? 4 : 2);
693 if (output_size > alloc_data_size) { 693 if (output_size > alloc_data_size) {
694 av_log(s->avctx, AV_LOG_ERROR, "output data size is larger than " 694 av_log(s->avctx, AV_LOG_ERROR, "output data size is larger than "
695 "allocated data size\n"); 695 "allocated data size\n");
696 return -1; 696 goto end;
697 } 697 }
698 *data_size = output_size; 698 *data_size = output_size;
699 699
700 #define DECORRELATE(left, right)\ 700 #define DECORRELATE(left, right)\
701 assert(s->channels == 2);\ 701 assert(s->channels == 2);\