comparison wma.c @ 5086:a10ebd496bd9 libavcodec

sanity checks (should prevent hypothetical div by zero issue) should fix sf bug #1547313
author michael
date Wed, 30 May 2007 23:06:37 +0000
parents 99d9dd34903b
children 04a241c308e8
comparison
equal deleted inserted replaced
5085:81bbca75ae2f 5086:a10ebd496bd9
69 float *window; 69 float *window;
70 float bps1, high_freq; 70 float bps1, high_freq;
71 volatile float bps; 71 volatile float bps;
72 int sample_rate1; 72 int sample_rate1;
73 int coef_vlc_table; 73 int coef_vlc_table;
74
75 if( avctx->sample_rate<=0 || avctx->sample_rate>50000
76 || avctx->channels<=0 || avctx->channels>8
77 || avctx->bit_rate<=0)
78 return -1;
74 79
75 s->sample_rate = avctx->sample_rate; 80 s->sample_rate = avctx->sample_rate;
76 s->nb_channels = avctx->channels; 81 s->nb_channels = avctx->channels;
77 s->bit_rate = avctx->bit_rate; 82 s->bit_rate = avctx->bit_rate;
78 s->block_align = avctx->block_align; 83 s->block_align = avctx->block_align;