diff options
author | Diego Biurrun <diego@biurrun.de> | 2009-08-15 11:02:50 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2009-08-15 11:02:50 +0000 |
commit | 7c809dc3e24a321ed0b1fc3a34442127b762f801 (patch) | |
tree | 73039cb645ad3ffeacdc54f779dc90a3444b2ad5 /libavcodec/libdiracenc.c | |
parent | cea0b5272d82c19c86dfcc3c61e097f4df9a4c2d (diff) | |
download | ffmpeg-7c809dc3e24a321ed0b1fc3a34442127b762f801.tar.gz |
Simplify 'if' condition statements.
Drop useless '!= 0' from 'exp != 0', replace 'exp == 0' by '!exp'.
Originally committed as revision 19647 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/libdiracenc.c')
-rw-r--r-- | libavcodec/libdiracenc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/libdiracenc.c b/libavcodec/libdiracenc.c index 07510c6afc..a9f8438e37 100644 --- a/libavcodec/libdiracenc.c +++ b/libavcodec/libdiracenc.c @@ -175,7 +175,7 @@ static av_cold int libdirac_encode_init(AVCodecContext *avccontext) } /* Intra-only sequence */ - if (avccontext->gop_size == 0 ) { + if (!avccontext->gop_size) { p_dirac_params->enc_ctx.enc_params.num_L1 = 0; if (avccontext->coder_type == FF_CODER_TYPE_VLC) p_dirac_params->enc_ctx.enc_params.using_ac = 0; @@ -183,7 +183,7 @@ static av_cold int libdirac_encode_init(AVCodecContext *avccontext) avccontext->has_b_frames = 1; if (avccontext->flags & CODEC_FLAG_QSCALE) { - if (avccontext->global_quality != 0) { + if (avccontext->global_quality) { p_dirac_params->enc_ctx.enc_params.qf = avccontext->global_quality / (FF_QP2LAMBDA*10.0); /* if it is not default bitrate then send target rate. */ @@ -246,7 +246,7 @@ static int libdirac_encode_frame(AVCodecContext *avccontext, int go = 1; int last_frame_in_sequence = 0; - if (data == NULL) { + if (!data) { /* push end of sequence if not already signalled */ if (!p_dirac_params->eos_signalled) { dirac_encoder_end_sequence( p_dirac_params->p_encoder ); @@ -358,7 +358,7 @@ static int libdirac_encode_frame(AVCodecContext *avccontext, p_next_output_frame = ff_dirac_schro_queue_pop(&p_dirac_params->enc_frame_queue); - if (p_next_output_frame == NULL) + if (!p_next_output_frame) return 0; memcpy(frame, p_next_output_frame->p_encbuf, p_next_output_frame->size); |