[libav-commits] lavc: Fix assignments in if() when calling ff_af_queue_add

Michael Niedermayer git at libav.org
Mon Jan 14 12:13:53 CET 2013


Module: libav
Branch: master
Commit: 1d7ffd06e41e44d8932d0dd62caa2da17947d8c4

Author:    Michael Niedermayer <michaelni at gmx.at>
Committer: Martin Storsjö <martin at martin.st>
Date:      Mon Jan 14 00:02:50 2013 +0100

lavc: Fix assignments in if() when calling ff_af_queue_add

Signed-off-by: Martin Storsjö <martin at martin.st>

---

 libavcodec/aacenc.c          |    2 +-
 libavcodec/libfaac.c         |    2 +-
 libavcodec/libfdk-aacenc.c   |    2 +-
 libavcodec/libmp3lame.c      |    2 +-
 libavcodec/libopencore-amr.c |    2 +-
 libavcodec/libspeexenc.c     |    2 +-
 libavcodec/libvo-aacenc.c    |    2 +-
 libavcodec/libvorbis.c       |    2 +-
 libavcodec/nellymoserenc.c   |    2 +-
 libavcodec/ra144enc.c        |    2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 5558e39..6f582ca 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -518,7 +518,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
 
     /* add current frame to queue */
     if (frame) {
-        if ((ret = ff_af_queue_add(&s->afq, frame) < 0))
+        if ((ret = ff_af_queue_add(&s->afq, frame)) < 0)
             return ret;
     }
 
diff --git a/libavcodec/libfaac.c b/libavcodec/libfaac.c
index 745fee2..d32e776 100644
--- a/libavcodec/libfaac.c
+++ b/libavcodec/libfaac.c
@@ -200,7 +200,7 @@ static int Faac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
 
     /* add current frame to the queue */
     if (frame) {
-        if ((ret = ff_af_queue_add(&s->afq, frame) < 0))
+        if ((ret = ff_af_queue_add(&s->afq, frame)) < 0)
             return ret;
     }
 
diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
index 00397d5..c40bced 100644
--- a/libavcodec/libfdk-aacenc.c
+++ b/libavcodec/libfdk-aacenc.c
@@ -334,7 +334,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
         in_buf.bufElSizes        = &in_buffer_element_size;
 
         /* add current frame to the queue */
-        if ((ret = ff_af_queue_add(&s->afq, frame) < 0))
+        if ((ret = ff_af_queue_add(&s->afq, frame)) < 0)
             return ret;
     }
 
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 264a0e2..156665c 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -236,7 +236,7 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
 
     /* add current frame to the queue */
     if (frame) {
-        if ((ret = ff_af_queue_add(&s->afq, frame) < 0))
+        if ((ret = ff_af_queue_add(&s->afq, frame)) < 0)
             return ret;
     }
 
diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index 8dc2e9f..2662d0b 100644
--- a/libavcodec/libopencore-amr.c
+++ b/libavcodec/libopencore-amr.c
@@ -262,7 +262,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
             if (frame->nb_samples < avctx->frame_size - avctx->delay)
                 s->enc_last_frame = -1;
         }
-        if ((ret = ff_af_queue_add(&s->afq, frame) < 0)) {
+        if ((ret = ff_af_queue_add(&s->afq, frame)) < 0) {
             av_freep(&flush_buf);
             return ret;
         }
diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c
index e30185a..4277e62 100644
--- a/libavcodec/libspeexenc.c
+++ b/libavcodec/libspeexenc.c
@@ -287,7 +287,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
             speex_encode_stereo_int(samples, s->header.frame_size, &s->bits);
         speex_encode_int(s->enc_state, samples, &s->bits);
         s->pkt_frame_count++;
-        if ((ret = ff_af_queue_add(&s->afq, frame) < 0))
+        if ((ret = ff_af_queue_add(&s->afq, frame)) < 0)
             return ret;
     } else {
         /* handle end-of-stream */
diff --git a/libavcodec/libvo-aacenc.c b/libavcodec/libvo-aacenc.c
index d09f1ed..31822b5 100644
--- a/libavcodec/libvo-aacenc.c
+++ b/libavcodec/libvo-aacenc.c
@@ -157,7 +157,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
             samples = (VO_PBYTE)frame->data[0];
         }
         /* add current frame to the queue */
-        if ((ret = ff_af_queue_add(&s->afq, frame) < 0))
+        if ((ret = ff_af_queue_add(&s->afq, frame)) < 0)
             return ret;
     }
 
diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c
index a31d476..092cbbc 100644
--- a/libavcodec/libvorbis.c
+++ b/libavcodec/libvorbis.c
@@ -279,7 +279,7 @@ static int oggvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
             av_log(avctx, AV_LOG_ERROR, "error in vorbis_analysis_wrote()\n");
             return vorbis_error_to_averror(ret);
         }
-        if ((ret = ff_af_queue_add(&s->afq, frame) < 0))
+        if ((ret = ff_af_queue_add(&s->afq, frame)) < 0)
             return ret;
     } else {
         if (!s->eof)
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c
index 487cffd..1222826 100644
--- a/libavcodec/nellymoserenc.c
+++ b/libavcodec/nellymoserenc.c
@@ -397,7 +397,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
             if (frame->nb_samples >= NELLY_BUF_LEN)
                 s->last_frame = 1;
         }
-        if ((ret = ff_af_queue_add(&s->afq, frame) < 0))
+        if ((ret = ff_af_queue_add(&s->afq, frame)) < 0)
             return ret;
     } else {
         memset(s->buf + NELLY_BUF_LEN, 0, NELLY_SAMPLES * sizeof(*s->buf));
diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c
index 5b5de76..b9473ac 100644
--- a/libavcodec/ra144enc.c
+++ b/libavcodec/ra144enc.c
@@ -537,7 +537,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
         for (; i < frame->nb_samples; i++)
             ractx->curr_block[i] = samples[i] >> 2;
 
-        if ((ret = ff_af_queue_add(&ractx->afq, frame) < 0))
+        if ((ret = ff_af_queue_add(&ractx->afq, frame)) < 0)
             return ret;
     } else
         ractx->last_frame = 1;



More information about the libav-commits mailing list