[FFmpeg-devel] [PATCH] cosmetics: remove superfluous curly brackets

Paul B Mahol onemda at gmail.com
Thu Mar 22 21:22:39 CET 2012


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavcodec/a64multienc.c        |    3 +--
 libavcodec/aacenc.c             |    3 +--
 libavcodec/ac3enc_template.c    |    3 +--
 libavcodec/adpcmenc.c           |    3 +--
 libavcodec/adxenc.c             |    3 +--
 libavcodec/alacenc.c            |    3 +--
 libavcodec/asv1.c               |    3 +--
 libavcodec/bmpenc.c             |    3 +--
 libavcodec/cljr.c               |    3 +--
 libavcodec/dnxhdenc.c           |    3 +--
 libavcodec/dpxenc.c             |    3 +--
 libavcodec/dv.c                 |    3 +--
 libavcodec/ffv1.c               |    3 +--
 libavcodec/flacenc.c            |    3 +--
 libavcodec/flashsv2enc.c        |    3 +--
 libavcodec/flashsvenc.c         |    3 +--
 libavcodec/g722enc.c            |    3 +--
 libavcodec/g726.c               |    3 +--
 libavcodec/gif.c                |    3 +--
 libavcodec/huffyuv.c            |    3 +--
 libavcodec/j2kenc.c             |    3 +--
 libavcodec/jpeglsenc.c          |    3 +--
 libavcodec/lclenc.c             |    3 +--
 libavcodec/libfaac.c            |    3 +--
 libavcodec/libgsm.c             |    3 +--
 libavcodec/libmp3lame.c         |    3 +--
 libavcodec/libopencore-amr.c    |    3 +--
 libavcodec/libschroedingerenc.c |    3 +--
 libavcodec/libspeexenc.c        |    3 +--
 libavcodec/libtheoraenc.c       |    3 +--
 libavcodec/libutvideoenc.cpp    |    3 +--
 libavcodec/libvo-aacenc.c       |    3 +--
 libavcodec/libvo-amrwbenc.c     |    3 +--
 libavcodec/libvorbis.c          |    3 +--
 libavcodec/libxavs.c            |    3 +--
 libavcodec/libxvidff.c          |    3 +--
 libavcodec/ljpegenc.c           |    3 +--
 libavcodec/mpegaudioenc.c       |    3 +--
 libavcodec/msvideo1enc.c        |    3 +--
 libavcodec/nellymoserenc.c      |    3 +--
 libavcodec/pamenc.c             |    3 +--
 libavcodec/pcm.c                |    3 +--
 libavcodec/pcxenc.c             |    3 +--
 libavcodec/pngenc.c             |    3 +--
 libavcodec/pnmenc.c             |    3 +--
 libavcodec/proresenc_anatoliy.c |    3 +--
 libavcodec/proresenc_kostya.c   |    3 +--
 libavcodec/qtrleenc.c           |    3 +--
 libavcodec/r210enc.c            |    3 +--
 libavcodec/ra144enc.c           |    3 +--
 libavcodec/roqaudioenc.c        |    3 +--
 libavcodec/roqvideoenc.c        |    3 +--
 libavcodec/sgienc.c             |    3 +--
 libavcodec/snowenc.c            |    3 +--
 libavcodec/svq1enc.c            |    3 +--
 libavcodec/targaenc.c           |    3 +--
 libavcodec/tiffenc.c            |    3 +--
 libavcodec/v210enc.c            |    3 +--
 libavcodec/v308enc.c            |    3 +--
 libavcodec/v408enc.c            |    3 +--
 libavcodec/v410enc.c            |    3 +--
 libavcodec/vorbisenc.c          |    3 +--
 libavcodec/wmaenc.c             |    3 +--
 libavcodec/xbmenc.c             |    3 +--
 libavcodec/xwdenc.c             |    3 +--
 libavcodec/y41penc.c            |    3 +--
 libavcodec/yuv4enc.c            |    3 +--
 libavcodec/zmbvenc.c            |    3 +--
 68 files changed, 68 insertions(+), 136 deletions(-)

diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c
index 294c537..09aaf0c 100644
--- a/libavcodec/a64multienc.c
+++ b/libavcodec/a64multienc.c
@@ -308,9 +308,8 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         /* any frames to encode? */
         if (c->mc_lifetime) {
             req_size = charset_size + c->mc_lifetime*(screen_size + colram_size);
-            if ((ret = ff_alloc_packet2(avctx, pkt, req_size)) < 0) {
+            if ((ret = ff_alloc_packet2(avctx, pkt, req_size)) < 0)
                 return ret;
-            }
             buf = pkt->data;
 
             /* calc optimal new charset + charmaps */
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 09f92be..cf4aef9 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -574,9 +574,8 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     do {
         int frame_bits;
 
-        if ((ret = ff_alloc_packet2(avctx, avpkt, 768 * s->channels))) {
+        if ((ret = ff_alloc_packet2(avctx, avpkt, 768 * s->channels)))
             return ret;
-        }
         init_put_bits(&s->pb, avpkt->data, avpkt->size);
 
         if ((avctx->frame_number & 0xFF)==1 && !(avctx->flags & CODEC_FLAG_BITEXACT))
diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c
index 8ef073a..20ac301 100644
--- a/libavcodec/ac3enc_template.c
+++ b/libavcodec/ac3enc_template.c
@@ -437,9 +437,8 @@ int AC3_NAME(encode_frame)(AVCodecContext *avctx, AVPacket *avpkt,
 
     ff_ac3_quantize_mantissas(s);
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, s->frame_size))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, s->frame_size)))
         return ret;
-    }
     ff_ac3_output_frame(s, avpkt->data);
 
     if (frame->pts != AV_NOPTS_VALUE)
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index d2a17c5..e46e6f2 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -494,9 +494,8 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
         pkt_size = (2 + avctx->channels * (22 + 4 * (frame->nb_samples - 1)) + 7) / 8;
     else
         pkt_size = avctx->block_align;
-    if ((ret = ff_alloc_packet2(avctx, avpkt, pkt_size))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, pkt_size)))
         return ret;
-    }
     dst = avpkt->data;
 
     switch(avctx->codec->id) {
diff --git a/libavcodec/adxenc.c b/libavcodec/adxenc.c
index d82cae3..ca472e0 100644
--- a/libavcodec/adxenc.c
+++ b/libavcodec/adxenc.c
@@ -139,9 +139,8 @@ static int adx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     int ch, out_size, ret;
 
     out_size = BLOCK_SIZE * avctx->channels + !c->header_parsed * HEADER_SIZE;
-    if ((ret = ff_alloc_packet2(avctx, avpkt, out_size)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, out_size)) < 0)
         return ret;
-    }
     dst = avpkt->data;
 
     if (!c->header_parsed) {
diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c
index a545b09..0194e2f 100644
--- a/libavcodec/alacenc.c
+++ b/libavcodec/alacenc.c
@@ -552,9 +552,8 @@ static int alac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     else
         max_frame_size = s->max_coded_frame_size;
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, 2 * max_frame_size))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, 2 * max_frame_size)))
         return ret;
-    }
 
     /* use verbatim mode for compression_level 0 */
     s->verbatim = !s->compression_level;
diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c
index ea7f052..3af6900 100644
--- a/libavcodec/asv1.c
+++ b/libavcodec/asv1.c
@@ -473,9 +473,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     int mb_x, mb_y;
 
     if ((ret = ff_alloc_packet2(avctx, pkt, a->mb_height*a->mb_width*MAX_MB_SIZE +
-                                  FF_MIN_BUFFER_SIZE)) < 0) {
+                                  FF_MIN_BUFFER_SIZE)) < 0)
         return ret;
-    }
 
     init_put_bits(&a->pb, pkt->data, pkt->size);
 
diff --git a/libavcodec/bmpenc.c b/libavcodec/bmpenc.c
index 865744e..158bc01 100644
--- a/libavcodec/bmpenc.c
+++ b/libavcodec/bmpenc.c
@@ -120,9 +120,8 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 #define SIZE_BITMAPINFOHEADER 40
     hsize = SIZE_BITMAPFILEHEADER + SIZE_BITMAPINFOHEADER + (pal_entries << 2);
     n_bytes = n_bytes_image + hsize;
-    if ((ret = ff_alloc_packet2(avctx, pkt, n_bytes)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, n_bytes)) < 0)
         return ret;
-    }
     buf = pkt->data;
     bytestream_put_byte(&buf, 'B');                   // BITMAPFILEHEADER.bfType
     bytestream_put_byte(&buf, 'M');                   // do.
diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c
index 688906f..4e70ccd 100644
--- a/libavcodec/cljr.c
+++ b/libavcodec/cljr.c
@@ -146,9 +146,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         { 0xCB2A0000, 0xCB250000 },
     };
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, 32*avctx->height*avctx->width/4)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, 32*avctx->height*avctx->width/4)) < 0)
         return ret;
-    }
 
     avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
     avctx->coded_frame->key_frame = 1;
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index 22640eb..3a297bf 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -910,9 +910,8 @@ static int dnxhd_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
     int offset, i, ret;
     uint8_t *buf;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, ctx->cid_table->frame_size)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, ctx->cid_table->frame_size)) < 0)
         return ret;
-    }
     buf = pkt->data;
 
     dnxhd_load_picture(ctx, frame);
diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c
index b9c3c30..6e06a09 100644
--- a/libavcodec/dpxenc.c
+++ b/libavcodec/dpxenc.c
@@ -117,9 +117,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         size = avctx->height * avctx->width * 4;
     else
         size = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
-    if ((ret = ff_alloc_packet2(avctx, pkt, size + HEADER_SIZE)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, size + HEADER_SIZE)) < 0)
         return ret;
-    }
     buf = pkt->data;
 
     memset(buf, 0, HEADER_SIZE);
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 5312f34..309846a 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -1286,9 +1286,8 @@ static int dvvideo_encode_frame(AVCodecContext *c, AVPacket *pkt,
     s->sys = avpriv_dv_codec_profile(c);
     if (!s->sys || dv_init_dynamic_tables(s->sys))
         return -1;
-    if ((ret = ff_alloc_packet2(c, pkt, s->sys->frame_size)) < 0) {
+    if ((ret = ff_alloc_packet2(c, pkt, s->sys->frame_size)) < 0)
         return ret;
-    }
 
     c->pix_fmt           = s->sys->pix_fmt;
     s->picture           = *frame;
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index f371c37..b251c8b 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -1155,9 +1155,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     int i, ret;
 
     if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width*avctx->height*((8*2+1+1)*4)/8
-                                  + FF_MIN_BUFFER_SIZE)) < 0) {
+                                  + FF_MIN_BUFFER_SIZE)) < 0)
         return ret;
-    }
 
     ff_init_range_encoder(c, pkt->data, pkt->size);
     ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 8b67fee..1858dac 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -1254,9 +1254,8 @@ static int flac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
         frame_bytes = encode_frame(s);
     }
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, frame_bytes))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, frame_bytes)))
         return ret;
-    }
 
     out_bytes = write_frame(s, avpkt);
 
diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c
index 042331c..fd7f5c7 100644
--- a/libavcodec/flashsv2enc.c
+++ b/libavcodec/flashsv2enc.c
@@ -834,9 +834,8 @@ static int flashsv2_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 
     *p = *pict;
 
-    if ((res = ff_alloc_packet2(avctx, pkt, s->frame_size + FF_MIN_BUFFER_SIZE)) < 0) {
+    if ((res = ff_alloc_packet2(avctx, pkt, s->frame_size + FF_MIN_BUFFER_SIZE)) < 0)
         return res;
-    }
 
     /* First frame needs to be a keyframe */
     if (avctx->frame_number == 0)
diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c
index 1d0f5fb..0392c61 100644
--- a/libavcodec/flashsvenc.c
+++ b/libavcodec/flashsvenc.c
@@ -228,9 +228,8 @@ static int flashsv_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         I_frame = 1;
     }
 
-    if ((res = ff_alloc_packet2(avctx, pkt, s->image_width * s->image_height * 3)) < 0) {
+    if ((res = ff_alloc_packet2(avctx, pkt, s->image_width * s->image_height * 3)) < 0)
         return res;
-    }
 
     pkt->size = encode_bitstream(s, p, pkt->data, pkt->size, opt_w * 16, opt_h * 16,
                                  pfptr, &I_frame);
diff --git a/libavcodec/g722enc.c b/libavcodec/g722enc.c
index 0aa17fb..3833e36 100644
--- a/libavcodec/g722enc.c
+++ b/libavcodec/g722enc.c
@@ -366,9 +366,8 @@ static int g722_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     int nb_samples, out_size, ret;
 
     out_size = (frame->nb_samples + 1) / 2;
-    if ((ret = ff_alloc_packet2(avctx, avpkt, out_size))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, out_size)))
         return ret;
-    }
 
     nb_samples = frame->nb_samples - (frame->nb_samples & 1);
 
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index 6841b11..329e2b9 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -361,9 +361,8 @@ static int g726_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     int i, ret, out_size;
 
     out_size = (frame->nb_samples * c->code_size + 7) / 8;
-    if ((ret = ff_alloc_packet2(avctx, avpkt, out_size))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, out_size)))
         return ret;
-    }
     init_put_bits(&pb, avpkt->data, avpkt->size);
 
     for (i = 0; i < frame->nb_samples; i++)
diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index b8d7f1a..ba777cb 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -164,9 +164,8 @@ static int gif_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint8_t *outbuf_ptr, *end;
     int ret;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width*avctx->height*7/5 + FF_MIN_BUFFER_SIZE)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width*avctx->height*7/5 + FF_MIN_BUFFER_SIZE)) < 0)
         return ret;
-    }
     outbuf_ptr = pkt->data;
     end        = pkt->data + pkt->size;
 
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index 7082ed8..993c2e7 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -1279,9 +1279,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     AVFrame * const p= &s->picture;
     int i, j, size = 0, ret;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, width * height * 3 * 4 + FF_MIN_BUFFER_SIZE)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, width * height * 3 * 4 + FF_MIN_BUFFER_SIZE)) < 0)
         return ret;
-    }
 
     *p = *pict;
     p->pict_type= AV_PICTURE_TYPE_I;
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index f201c2c..56ccd9e 100644
--- a/libavcodec/j2kenc.c
+++ b/libavcodec/j2kenc.c
@@ -927,9 +927,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     int tileno, ret;
     J2kEncoderContext *s = avctx->priv_data;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width*avctx->height*9 + FF_MIN_BUFFER_SIZE)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width*avctx->height*9 + FF_MIN_BUFFER_SIZE)) < 0)
         return ret;
-    }
 
     // init:
     s->buf = s->buf_start = pkt->data;
diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c
index 4b8bedb..aadea77 100644
--- a/libavcodec/jpeglsenc.c
+++ b/libavcodec/jpeglsenc.c
@@ -251,9 +251,8 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt,
         comps = 3;
 
     if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width*avctx->height*comps*4 +
-                                    FF_MIN_BUFFER_SIZE)) < 0) {
+                                    FF_MIN_BUFFER_SIZE)) < 0)
         return ret;
-    }
 
     buf2 = av_malloc(pkt->size);
 
diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
index 854968b..8236781 100644
--- a/libavcodec/lclenc.c
+++ b/libavcodec/lclenc.c
@@ -78,9 +78,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     int zret; // Zlib return code
     int max_size = deflateBound(&c->zstream, avctx->width * avctx->height * 3);
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, max_size)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, max_size)) < 0)
             return ret;
-    }
 
     *p = *pict;
     p->pict_type= AV_PICTURE_TYPE_I;
diff --git a/libavcodec/libfaac.c b/libavcodec/libfaac.c
index 06152d9..cf76dcc 100644
--- a/libavcodec/libfaac.c
+++ b/libavcodec/libfaac.c
@@ -184,9 +184,8 @@ static int Faac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     int num_samples  = frame ? frame->nb_samples : 0;
     void *samples    = frame ? frame->data[0]    : NULL;
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, (7 + 768) * avctx->channels))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, (7 + 768) * avctx->channels)))
         return ret;
-    }
 
     bytes_written = faacEncEncode(s->faac_handle, samples,
                                   num_samples * avctx->channels,
diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c
index eafcbec..3a81b57 100644
--- a/libavcodec/libgsm.c
+++ b/libavcodec/libgsm.c
@@ -100,9 +100,8 @@ static int libgsm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     gsm_signal *samples = (gsm_signal *)frame->data[0];
     struct gsm_state *state = avctx->priv_data;
 
-    if ((ret = ff_alloc_packet2(avctx, vpkt, avctx->block_align))) {
+    if ((ret = ff_alloc_packet2(avctx, vpkt, avctx->block_align)))
         return ret;
-    }
 
     switch(avctx->codec_id) {
     case CODEC_ID_GSM:
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index b8c32bc..43f76c8 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -255,9 +255,8 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     av_dlog(avctx, "in:%d packet-len:%d index:%d\n", avctx->frame_size, len,
             s->buffer_index);
     if (len <= s->buffer_index) {
-        if ((ret = ff_alloc_packet2(avctx, avpkt, len))) {
+        if ((ret = ff_alloc_packet2(avctx, avpkt, len)))
             return ret;
-        }
         memcpy(avpkt->data, s->buffer, len);
         s->buffer_index -= len;
         memmove(s->buffer, s->buffer + len, s->buffer_index);
diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index 36fc899..c97291a 100644
--- a/libavcodec/libopencore-amr.c
+++ b/libavcodec/libopencore-amr.c
@@ -244,9 +244,8 @@ static int amr_nb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
         s->enc_bitrate = avctx->bit_rate;
     }
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, 32))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, 32)))
         return ret;
-    }
 
     if (frame) {
         if (frame->nb_samples < avctx->frame_size) {
diff --git a/libavcodec/libschroedingerenc.c b/libavcodec/libschroedingerenc.c
index 3f3bb32..a7f8760 100644
--- a/libavcodec/libschroedingerenc.c
+++ b/libavcodec/libschroedingerenc.c
@@ -381,9 +381,8 @@ static int libschroedinger_encode_frame(AVCodecContext *avccontext, AVPacket *pk
     pkt_size = p_frame_output->size;
     if (last_frame_in_sequence && p_schro_params->enc_buf_size > 0)
         pkt_size += p_schro_params->enc_buf_size;
-    if ((ret = ff_alloc_packet2(avccontext, pkt, pkt_size)) < 0) {
+    if ((ret = ff_alloc_packet2(avccontext, pkt, pkt_size)) < 0)
         goto error;
-    }
 
     memcpy(pkt->data, p_frame_output->p_encbuf, p_frame_output->size);
     avccontext->coded_frame->key_frame = p_frame_output->key_frame;
diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c
index 2a690de..b9e9c03 100644
--- a/libavcodec/libspeexenc.c
+++ b/libavcodec/libspeexenc.c
@@ -267,9 +267,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     /* write output if all frames for the packet have been encoded */
     if (s->pkt_frame_count == s->frames_per_packet) {
         s->pkt_frame_count = 0;
-        if ((ret = ff_alloc_packet2(avctx, avpkt, speex_bits_nbytes(&s->bits)))) {
+        if ((ret = ff_alloc_packet2(avctx, avpkt, speex_bits_nbytes(&s->bits))))
             return ret;
-        }
         ret = speex_bits_write(&s->bits, avpkt->data, avpkt->size);
         speex_bits_reset(&s->bits);
 
diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index 732c24a..8cdfaaa 100644
--- a/libavcodec/libtheoraenc.c
+++ b/libavcodec/libtheoraenc.c
@@ -328,9 +328,8 @@ static int encode_frame(AVCodecContext* avc_context, AVPacket *pkt,
     }
 
     /* Copy ogg_packet content out to buffer */
-    if ((ret = ff_alloc_packet2(avc_context, pkt, o_packet.bytes)) < 0) {
+    if ((ret = ff_alloc_packet2(avc_context, pkt, o_packet.bytes)) < 0)
         return ret;
-    }
     memcpy(pkt->data, o_packet.packet, o_packet.bytes);
 
     // HACK: assumes no encoder delay, this is true until libtheora becomes
diff --git a/libavcodec/libutvideoenc.cpp b/libavcodec/libutvideoenc.cpp
index dccfa6b..9ddd0c1 100644
--- a/libavcodec/libutvideoenc.cpp
+++ b/libavcodec/libutvideoenc.cpp
@@ -130,9 +130,8 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint8_t *dst;
 
     /* Alloc buffer */
-    if ((ret = ff_alloc_packet2(avctx, pkt, utv->buf_size)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, utv->buf_size)) < 0)
         return ret;
-    }
 
     dst = pkt->data;
 
diff --git a/libavcodec/libvo-aacenc.c b/libavcodec/libvo-aacenc.c
index 8070833..8f7c581 100644
--- a/libavcodec/libvo-aacenc.c
+++ b/libavcodec/libvo-aacenc.c
@@ -161,9 +161,8 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
             return ret;
     }
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, FFMAX(8192, 768 * avctx->channels)))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, FFMAX(8192, 768 * avctx->channels))))
         return ret;
-    }
 
     input.Buffer  = samples;
     input.Length  = 2 * avctx->channels * avctx->frame_size;
diff --git a/libavcodec/libvo-amrwbenc.c b/libavcodec/libvo-amrwbenc.c
index b70ec05..ff08a81 100644
--- a/libavcodec/libvo-amrwbenc.c
+++ b/libavcodec/libvo-amrwbenc.c
@@ -117,9 +117,8 @@ static int amr_wb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     const int16_t *samples = (const int16_t *)frame->data[0];
     int size, ret;
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, MAX_PACKET_SIZE))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, MAX_PACKET_SIZE)))
         return ret;
-    }
 
     if (s->last_bitrate != avctx->bit_rate) {
         s->mode         = get_wb_bitrate_mode(avctx->bit_rate, avctx);
diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c
index cbbe268..db65d16 100644
--- a/libavcodec/libvorbis.c
+++ b/libavcodec/libvorbis.c
@@ -353,9 +353,8 @@ static int oggvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
 
     av_fifo_generic_read(s->pkt_fifo, &op, sizeof(ogg_packet), NULL);
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, op.bytes))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, op.bytes)))
         return ret;
-    }
     av_fifo_generic_read(s->pkt_fifo, avpkt->data, op.bytes, NULL);
 
     avpkt->pts = ff_samples_to_time_base(avctx, op.granulepos);
diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c
index f7bdf82..39da64c 100644
--- a/libavcodec/libxavs.c
+++ b/libavcodec/libxavs.c
@@ -87,9 +87,8 @@ static int encode_nals(AVCodecContext *ctx, AVPacket *pkt,
     for (i = 0; i < nnal; i++)
         size += nals[i].i_payload;
 
-    if ((ret = ff_alloc_packet2(ctx, pkt, size)) < 0) {
+    if ((ret = ff_alloc_packet2(ctx, pkt, size)) < 0)
         return ret;
-    }
     p = pkt->data;
 
     /* Write the SEI as part of the first frame. */
diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c
index 158430d..3bca945 100644
--- a/libavcodec/libxvidff.c
+++ b/libavcodec/libxvidff.c
@@ -385,9 +385,8 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     xvid_enc_frame_t xvid_enc_frame;
     xvid_enc_stats_t xvid_enc_stats;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, mb_width*mb_height*MAX_MB_BYTES + FF_MIN_BUFFER_SIZE)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, mb_width*mb_height*MAX_MB_BYTES + FF_MIN_BUFFER_SIZE)) < 0)
         return ret;
-    }
 
     /* Start setting up the frame */
     memset(&xvid_enc_frame, 0, sizeof(xvid_enc_frame));
diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c
index 162a679..733e5e9 100644
--- a/libavcodec/ljpegenc.c
+++ b/libavcodec/ljpegenc.c
@@ -57,9 +57,8 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt,
         max_pkt_size += mb_width * mb_height * 3 * 4
                         * s->mjpeg_hsample[0] * s->mjpeg_vsample[0];
     }
-    if ((ret = ff_alloc_packet2(avctx, pkt, max_pkt_size)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, max_pkt_size)) < 0)
         return ret;
-    }
 
     init_put_bits(&s->pb, pkt->data, pkt->size);
 
diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
index 5a4dc2a..38f440c 100644
--- a/libavcodec/mpegaudioenc.c
+++ b/libavcodec/mpegaudioenc.c
@@ -751,9 +751,8 @@ static int MPA_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     }
     compute_bit_allocation(s, smr, bit_alloc, &padding);
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, MPA_MAX_CODED_FRAME_SIZE))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, MPA_MAX_CODED_FRAME_SIZE)))
         return ret;
-    }
 
     init_put_bits(&s->pb, avpkt->data, avpkt->size);
 
diff --git a/libavcodec/msvideo1enc.c b/libavcodec/msvideo1enc.c
index b4ba4be..aa3c26a 100644
--- a/libavcodec/msvideo1enc.c
+++ b/libavcodec/msvideo1enc.c
@@ -76,9 +76,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     int i, j, k, x, y, ret;
     int skips = 0;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width*avctx->height*9 + FF_MIN_BUFFER_SIZE)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width*avctx->height*9 + FF_MIN_BUFFER_SIZE)) < 0)
         return ret;
-    }
     dst= buf= pkt->data;
 
     *p = *pict;
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c
index 9587fe3..59e0884 100644
--- a/libavcodec/nellymoserenc.c
+++ b/libavcodec/nellymoserenc.c
@@ -401,9 +401,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
         s->last_frame = 1;
     }
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, NELLY_BLOCK_LEN))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, NELLY_BLOCK_LEN)))
         return ret;
-    }
     encode_block(s, avpkt->data, avpkt->size);
 
     /* Get the next frame pts/duration */
diff --git a/libavcodec/pamenc.c b/libavcodec/pamenc.c
index 27d135f..3c36c5b 100644
--- a/libavcodec/pamenc.c
+++ b/libavcodec/pamenc.c
@@ -88,9 +88,8 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         return -1;
     }
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, n*h + 200)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, n*h + 200)) < 0)
         return ret;
-    }
 
     *p           = *pict;
     p->pict_type = AV_PICTURE_TYPE_I;
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 72a4e2a..5191048 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -96,9 +96,8 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     n           = frame->nb_samples * avctx->channels;
     samples     = (const short *)frame->data[0];
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, n * sample_size))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, n * sample_size)))
         return ret;
-    }
     dst = avpkt->data;
 
     switch(avctx->codec->id) {
diff --git a/libavcodec/pcxenc.c b/libavcodec/pcxenc.c
index 27af2aa..01c1b64 100644
--- a/libavcodec/pcxenc.c
+++ b/libavcodec/pcxenc.c
@@ -153,9 +153,8 @@ static int pcx_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     line_bytes = (line_bytes + 1) & ~1;
 
     max_pkt_size = 128 + avctx->height * 2 * line_bytes * nplanes + (pal ? 256*3 + 1 : 0);
-    if ((ret = ff_alloc_packet2(avctx, pkt, max_pkt_size)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, max_pkt_size)) < 0)
         return ret;
-    }
     buf     = pkt->data;
     buf_end = pkt->data + pkt->size;
 
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 5b2c2e4..ee7ad5a 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -289,9 +289,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     max_packet_size = avctx->height * (enc_row_size +
                                        ((enc_row_size + IOBUF_SIZE - 1) / IOBUF_SIZE) * 12)
                       + FF_MIN_BUFFER_SIZE;
-    if ((ret = ff_alloc_packet2(avctx, pkt, max_packet_size)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, max_packet_size)) < 0)
         return ret;
-    }
 
     s->bytestream_start =
     s->bytestream       = pkt->data;
diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c
index 99c579a..254703f 100644
--- a/libavcodec/pnmenc.c
+++ b/libavcodec/pnmenc.c
@@ -34,9 +34,8 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 
     if ((ret = ff_alloc_packet2(avctx, pkt, avpicture_get_size(avctx->pix_fmt,
                                                        avctx->width,
-                                                       avctx->height) + 200)) < 0) {
+                                                       avctx->height) + 200)) < 0)
         return ret;
-    }
 
     *p           = *pict;
     p->pict_type = AV_PICTURE_TYPE_I;
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index bd96b52..d35909b 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -494,9 +494,8 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     int frame_size = FFALIGN(avctx->width, 16) * FFALIGN(avctx->height, 16)*16 + 500 + FF_MIN_BUFFER_SIZE; //FIXME choose tighter limit
 
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, frame_size + FF_MIN_BUFFER_SIZE)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, frame_size + FF_MIN_BUFFER_SIZE)) < 0)
         return ret;
-    }
 
     buf = pkt->data;
     pic_size = prores_encode_picture(avctx, pict, buf + header_size + 8,
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 4bbfe27..86037d3 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -700,9 +700,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 
     pkt_size = ctx->frame_size + FF_MIN_BUFFER_SIZE;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size)) < 0)
         return ret;
-    }
 
     orig_buf = pkt->data;
 
diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c
index 565766b..8fc455a 100644
--- a/libavcodec/qtrleenc.c
+++ b/libavcodec/qtrleenc.c
@@ -310,9 +310,8 @@ static int qtrle_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 
     *p = *pict;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, s->max_buf_size)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, s->max_buf_size)) < 0)
         return ret;
-    }
 
     if (avctx->gop_size == 0 || (s->avctx->frame_number % avctx->gop_size) == 0) {
         /* I-Frame */
diff --git a/libavcodec/r210enc.c b/libavcodec/r210enc.c
index 331b072..92c9ce3 100644
--- a/libavcodec/r210enc.c
+++ b/libavcodec/r210enc.c
@@ -43,9 +43,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint8_t *src_line;
     uint8_t *dst;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, 4 * aligned_width * avctx->height)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, 4 * aligned_width * avctx->height)) < 0)
         return ret;
-    }
 
     avctx->coded_frame->reference = 0;
     avctx->coded_frame->key_frame = 1;
diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c
index 4b2db2d..9d74380 100644
--- a/libavcodec/ra144enc.c
+++ b/libavcodec/ra144enc.c
@@ -458,9 +458,8 @@ static int ra144_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     if (ractx->last_frame)
         return 0;
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, FRAMESIZE))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, FRAMESIZE)))
         return ret;
-    }
 
     /**
      * Since the LPC coefficients are calculated on a frame centered over the
diff --git a/libavcodec/roqaudioenc.c b/libavcodec/roqaudioenc.c
index 6bc0724..0b1cd21 100644
--- a/libavcodec/roqaudioenc.c
+++ b/libavcodec/roqaudioenc.c
@@ -171,9 +171,8 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     else
         data_size = avctx->channels * avctx->frame_size;
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, ROQ_HEADER_SIZE + data_size))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, ROQ_HEADER_SIZE + data_size)))
         return ret;
-    }
     out = avpkt->data;
 
     bytestream_put_byte(&out, stereo ? 0x21 : 0x20);
diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c
index f439e0c..bf9210f 100644
--- a/libavcodec/roqvideoenc.c
+++ b/libavcodec/roqvideoenc.c
@@ -1020,9 +1020,8 @@ static int roq_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     /* 138 bits max per 8x8 block +
      *     256 codebooks*(6 bytes 2x2 + 4 bytes 4x4) + 8 bytes frame header */
     size = ((enc->width * enc->height / 64) * 138 + 7) / 8 + 256 * (6 + 4) + 8;
-    if ((ret = ff_alloc_packet2(avctx, pkt, size)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, size)) < 0)
         return ret;
-    }
     enc->out_buf = pkt->data;
 
     /* Check for I frame */
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c
index 0f317c7..35796a5 100644
--- a/libavcodec/sgienc.c
+++ b/libavcodec/sgienc.c
@@ -113,9 +113,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     else // assume ff_rl_encode() produces at most 2x size of input
         length += tablesize * 2 + depth * height * (2 * width + 1);
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, bytes_per_channel * length)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, bytes_per_channel * length)) < 0)
         return ret;
-    }
     buf     = pkt->data;
     end_buf = pkt->data + pkt->size;
 
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 6cddec0..73d87be 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -1614,9 +1614,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint8_t rc_header_bak[sizeof(s->header_state)];
     uint8_t rc_block_bak[sizeof(s->block_state)];
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, s->b_width*s->b_height*MB_SIZE*MB_SIZE*3 + FF_MIN_BUFFER_SIZE)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, s->b_width*s->b_height*MB_SIZE*MB_SIZE*3 + FF_MIN_BUFFER_SIZE)) < 0)
         return ret;
-    }
 
     ff_init_range_encoder(c, pkt->data, pkt->size);
     ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index 35965fb..d372af9 100644
--- a/libavcodec/svq1enc.c
+++ b/libavcodec/svq1enc.c
@@ -505,9 +505,8 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     AVFrame temp;
     int i, ret;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, s->y_block_width*s->y_block_height*MAX_MB_BYTES*3 + FF_MIN_BUFFER_SIZE) < 0)) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, s->y_block_width*s->y_block_height*MAX_MB_BYTES*3 + FF_MIN_BUFFER_SIZE) < 0))
         return ret;
-    }
 
     if(avctx->pix_fmt != PIX_FMT_YUV410P){
         av_log(avctx, AV_LOG_ERROR, "unsupported pixel format\n");
diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c
index b4ad932..8056685 100644
--- a/libavcodec/targaenc.c
+++ b/libavcodec/targaenc.c
@@ -86,9 +86,8 @@ static int targa_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         return AVERROR(EINVAL);
     }
     picsize = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
-    if ((ret = ff_alloc_packet2(avctx, pkt, picsize + 45)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, picsize + 45)) < 0)
         return ret;
-    }
 
     /* zero out the header and only set applicable fields */
     memset(pkt->data, 0, 12);
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index e206cd3..fa86c48 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -305,9 +305,8 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt,
     strips = (s->height - 1) / s->rps + 1;
 
     if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * s->bpp * 2 +
-                                  avctx->height * 4 + FF_MIN_BUFFER_SIZE)) < 0) {
+                                  avctx->height * 4 + FF_MIN_BUFFER_SIZE)) < 0)
         return ret;
-    }
     ptr          = pkt->data;
     s->buf_start = pkt->data;
     s->buf       = &ptr;
diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c
index fd544bf..2cc1e0d 100644
--- a/libavcodec/v210enc.c
+++ b/libavcodec/v210enc.c
@@ -57,9 +57,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     const uint16_t *v = (const uint16_t*)pic->data[2];
     PutByteContext p;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->height * stride)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->height * stride)) < 0)
         return ret;
-    }
 
     bytestream2_init_writer(&p, pkt->data, pkt->size);
 
diff --git a/libavcodec/v308enc.c b/libavcodec/v308enc.c
index c728b01..d5c5fb0 100644
--- a/libavcodec/v308enc.c
+++ b/libavcodec/v308enc.c
@@ -48,9 +48,8 @@ static int v308_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint8_t *y, *u, *v;
     int i, j, ret;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * 3)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * 3)) < 0)
         return ret;
-    }
     dst = pkt->data;
 
     avctx->coded_frame->reference = 0;
diff --git a/libavcodec/v408enc.c b/libavcodec/v408enc.c
index 39b16a6..8781807 100644
--- a/libavcodec/v408enc.c
+++ b/libavcodec/v408enc.c
@@ -43,9 +43,8 @@ static int v408_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint8_t *y, *u, *v, *a;
     int i, j, ret;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * 4)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * 4)) < 0)
         return ret;
-    }
     dst = pkt->data;
 
     avctx->coded_frame->reference = 0;
diff --git a/libavcodec/v410enc.c b/libavcodec/v410enc.c
index e278ac4..1d4699b 100644
--- a/libavcodec/v410enc.c
+++ b/libavcodec/v410enc.c
@@ -49,9 +49,8 @@ static int v410_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint32_t val;
     int i, j, ret;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * 4)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * 4)) < 0)
         return ret;
-    }
     dst = pkt->data;
 
     avctx->coded_frame->reference = 0;
diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c
index bb6ad2c..6d8f9ff 100644
--- a/libavcodec/vorbisenc.c
+++ b/libavcodec/vorbisenc.c
@@ -1030,9 +1030,8 @@ static int vorbis_encode_frame(AVCodecContext *avccontext, AVPacket *avpkt,
         return 0;
     samples = 1 << (venc->log2_blocksize[0] - 1);
 
-    if ((ret = ff_alloc_packet2(avccontext, avpkt, 8192))) {
+    if ((ret = ff_alloc_packet2(avccontext, avpkt, 8192)))
         return ret;
-    }
 
     init_put_bits(&pb, avpkt->data, avpkt->size);
 
diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index 431344c..9b89f35 100644
--- a/libavcodec/wmaenc.c
+++ b/libavcodec/wmaenc.c
@@ -371,9 +371,8 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt,
         }
     }
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, 2 * MAX_CODED_SUPERFRAME_SIZE))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, 2 * MAX_CODED_SUPERFRAME_SIZE)))
         return ret;
-    }
 
 #if 1
     total_gain= 128;
diff --git a/libavcodec/xbmenc.c b/libavcodec/xbmenc.c
index 378a36c..bade9e7 100644
--- a/libavcodec/xbmenc.c
+++ b/libavcodec/xbmenc.c
@@ -41,9 +41,8 @@ static int xbm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 
     linesize = (avctx->width + 7) / 8;
     size     = avctx->height * (linesize * 7 + 2) + 110;
-    if ((ret = ff_alloc_packet2(avctx, pkt, size)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, size)) < 0)
         return ret;
-    }
 
     buf = pkt->data;
     ptr = p->data[0];
diff --git a/libavcodec/xwdenc.c b/libavcodec/xwdenc.c
index d8001e4..0dd3d0a 100644
--- a/libavcodec/xwdenc.c
+++ b/libavcodec/xwdenc.c
@@ -148,9 +148,8 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     header_size = XWD_HEADER_SIZE + WINDOW_NAME_SIZE;
     out_size    = header_size + ncolors * XWD_CMAP_SIZE + avctx->height * lsize;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, out_size)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, out_size)) < 0)
         return ret;
-    }
     buf = pkt->data;
 
     avctx->coded_frame->key_frame = 1;
diff --git a/libavcodec/y41penc.c b/libavcodec/y41penc.c
index 05bac7d..aafae8e 100644
--- a/libavcodec/y41penc.c
+++ b/libavcodec/y41penc.c
@@ -48,9 +48,8 @@ static int y41p_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint8_t *y, *u, *v;
     int i, j, ret;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * 1.5)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * 1.5)) < 0)
         return ret;
-    }
 
     avctx->coded_frame->reference = 0;
     avctx->coded_frame->key_frame = 1;
diff --git a/libavcodec/yuv4enc.c b/libavcodec/yuv4enc.c
index 2a5af8f..102e410 100644
--- a/libavcodec/yuv4enc.c
+++ b/libavcodec/yuv4enc.c
@@ -42,9 +42,8 @@ static int yuv4_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint8_t *y, *u, *v;
     int i, j, ret;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, 6 * (avctx->width + 1 >> 1) * (avctx->height + 1 >> 1))) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, 6 * (avctx->width + 1 >> 1) * (avctx->height + 1 >> 1))) < 0)
         return ret;
-    }
     dst = pkt->data;
 
     avctx->coded_frame->reference = 0;
diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c
index 3453d69..7723e72 100644
--- a/libavcodec/zmbvenc.c
+++ b/libavcodec/zmbvenc.c
@@ -228,9 +228,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     }
 
     pkt_size = c->zstream.total_out + 1 + 6*keyframe;
-    if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size)) < 0) {
+    if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size)) < 0)
         return ret;
-    }
     buf = pkt->data;
 
     fl = (keyframe ? ZMBV_KEYFRAME : 0) | (chpal ? ZMBV_DELTAPAL : 0);
-- 
1.7.7



More information about the ffmpeg-devel mailing list