Commit 968a32f9 authored by kostya's avatar kostya

Set data_size to zero when DCA header parse failed

Patch by Limin Wang <lance('\\'>>1)lmwang>(0x24^'D')<gmail>('/' & 0xFE)<com>
Thread [PATCH] set data_size to zero if failed to parse dca header



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10423 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c51eba69
...@@ -1151,6 +1151,7 @@ static int dca_decode_frame(AVCodecContext * avctx, ...@@ -1151,6 +1151,7 @@ static int dca_decode_frame(AVCodecContext * avctx,
init_get_bits(&s->gb, s->dca_buffer, s->dca_buffer_size * 8); init_get_bits(&s->gb, s->dca_buffer, s->dca_buffer_size * 8);
if (dca_parse_frame_header(s) < 0) { if (dca_parse_frame_header(s) < 0) {
//seems like the frame is corrupt, try with the next one //seems like the frame is corrupt, try with the next one
*data_size=0;
return buf_size; return buf_size;
} }
//set AVCodec values with parsed data //set AVCodec values with parsed data
......
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