diff options
author | Benjamin Larsson <banan@ludd.ltu.se> | 2006-02-06 11:21:10 +0000 |
---|---|---|
committer | Benjamin Larsson <banan@ludd.ltu.se> | 2006-02-06 11:21:10 +0000 |
commit | 2e9c78d3547efdcce0082a8b31357c780e84323f (patch) | |
tree | 237d4359d18e2b067805ecce8c6d7fdae988e44f /libavcodec/cook.c | |
parent | 7f129a33b100bf0682b83239668d9d9b194ab243 (diff) | |
download | ffmpeg-2e9c78d3547efdcce0082a8b31357c780e84323f.tar.gz |
Fix broken cosmetics commit and add a check for valid headers.
Originally committed as revision 4945 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cook.c')
-rw-r--r-- | libavcodec/cook.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavcodec/cook.c b/libavcodec/cook.c index b5f7cbfa60..4140be1538 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -1225,10 +1225,10 @@ static int cook_decode_init(AVCodecContext *avctx) q->js_vlc_bits = e->js_vlc_bits; } if (q->samples_per_channel > 256) { - q->log2_numvector_size = 6 + q->log2_numvector_size = 6; } if (q->samples_per_channel > 512) { - q->log2_numvector_size = 7 + q->log2_numvector_size = 7; } break; case MC_COOK: @@ -1282,6 +1282,11 @@ static int cook_decode_init(AVCodecContext *avctx) av_log(NULL,AV_LOG_ERROR,"subbands > 50, report sample!\n"); return -1; } + if ((q->samples_per_channel == 256) || (q->samples_per_channel == 512) || (q->samples_per_channel == 1024)) { + } else { + av_log(NULL,AV_LOG_ERROR,"unknown amount of samples_per_channel = %d, report sample!\n",q->samples_per_channel); + return -1; + } #ifdef COOKDEBUG dump_cook_context(q,e); |