[FFmpeg-devel] [PATCH 2/2] zerocodec: Cosmetics

Derek Buitenhuis derek.buitenhuis at gmail.com
Mon Mar 19 23:06:49 CET 2012


Fix some overly long (> 80 cols) lines, excess whitespace,
align some assignments, and put a space between system
and local headers.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
---
 libavcodec/zerocodec.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/libavcodec/zerocodec.c b/libavcodec/zerocodec.c
index f323a18..3bf1fd9 100644
--- a/libavcodec/zerocodec.c
+++ b/libavcodec/zerocodec.c
@@ -17,6 +17,7 @@
  */
 
 #include <zlib.h>
+
 #include "avcodec.h"
 
 typedef struct {
@@ -49,8 +50,8 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, void *data,
         return AVERROR(EINVAL);
     }
 
-    zstream->next_in   = avpkt->data;
-    zstream->avail_in  = avpkt->size;
+    zstream->next_in  = avpkt->data;
+    zstream->avail_in = avpkt->size;
 
     prev = prev_pic->data[0];
     dst  = pic->data[0];
@@ -73,7 +74,8 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, void *data,
             zret = inflate(zstream, Z_SYNC_FLUSH);
 
             if (zret != Z_OK && zret != Z_STREAM_END) {
-                av_log(avctx, AV_LOG_ERROR, "Inflate failed with return code: %d\n", zret);
+                av_log(avctx, AV_LOG_ERROR,
+                       "Inflate failed with return code: %d\n", zret);
                 return AVERROR(EINVAL);
             }
 
@@ -92,7 +94,8 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, void *data,
             zret = inflate(zstream, Z_SYNC_FLUSH);
 
             if (zret != Z_OK && zret != Z_STREAM_END) {
-                av_log(avctx, AV_LOG_ERROR, "Inflate failed with return code: %d\n", zret);
+                av_log(avctx, AV_LOG_ERROR,
+                       "Inflate failed with return code: %d\n", zret);
                 return AVERROR(EINVAL);
             }
 
@@ -111,7 +114,7 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, void *data,
     /* Store the previouse frame for use later */
     *prev_pic = *pic;
 
-    *data_size = sizeof(AVFrame);
+    *data_size       = sizeof(AVFrame);
     *(AVFrame *)data = *pic;
 
     return avpkt->size;
-- 
1.7.9.1



More information about the ffmpeg-devel mailing list