# HG changeset patch # User diego # Date 1242427286 0 # Node ID 1880dcbb6a8027c52ffc779d7795f0f8ed3b7aca # Parent 7204dc2922becf94ba030ed44e68e16f619ab5a0 Replace 'x == 0' if conditions with '!x'. diff -r 7204dc2922be -r 1880dcbb6a80 libamr.c --- a/libamr.c Fri May 15 20:12:45 2009 +0000 +++ b/libamr.c Fri May 15 22:41:26 2009 +0000 @@ -98,10 +98,10 @@ { const int is_amr_wb = 1 + (avctx->codec_id == CODEC_ID_AMR_WB); - if(avctx->sample_rate == 0) + if(!avctx->sample_rate) avctx->sample_rate = 8000 * is_amr_wb; - if(avctx->channels == 0) + if(!avctx->channels) avctx->channels = 1; avctx->frame_size = 160 * is_amr_wb; @@ -431,7 +431,7 @@ int packet_size; static const uint8_t block_size[16] = {18, 23, 33, 37, 41, 47, 51, 59, 61, 6, 6, 0, 0, 0, 1, 1}; - if(buf_size==0) + if(!buf_size) /* nothing to do */ return 0;