[FFmpeg-cvslog] avcodec/librav1e: Fix indentation

Derek Buitenhuis git at videolan.org
Sun Jan 17 14:39:24 EET 2021


ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Thu Jan 14 13:32:11 2021 +0000| [b085a72c54ced391d4e1cd00d2a2959b5a5704e6] | committer: Derek Buitenhuis

avcodec/librav1e: Fix indentation

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b085a72c54ced391d4e1cd00d2a2959b5a5704e6
---

 libavcodec/librav1e.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/libavcodec/librav1e.c b/libavcodec/librav1e.c
index e9b82a724a..46071bcdac 100644
--- a/libavcodec/librav1e.c
+++ b/libavcodec/librav1e.c
@@ -443,23 +443,23 @@ static int librav1e_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
             return ret;
 
         if (frame->buf[0]) {
-        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
+            const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
 
-        rframe = rav1e_frame_new(ctx->ctx);
-        if (!rframe) {
-            av_log(avctx, AV_LOG_ERROR, "Could not allocate new rav1e frame.\n");
-            av_frame_unref(frame);
-            return AVERROR(ENOMEM);
-        }
+            rframe = rav1e_frame_new(ctx->ctx);
+            if (!rframe) {
+                av_log(avctx, AV_LOG_ERROR, "Could not allocate new rav1e frame.\n");
+                av_frame_unref(frame);
+                return AVERROR(ENOMEM);
+            }
 
-        for (int i = 0; i < desc->nb_components; i++) {
-            int shift = i ? desc->log2_chroma_h : 0;
-            int bytes = desc->comp[0].depth == 8 ? 1 : 2;
-            rav1e_frame_fill_plane(rframe, i, frame->data[i],
-                                   (frame->height >> shift) * frame->linesize[i],
-                                   frame->linesize[i], bytes);
-        }
-        av_frame_unref(frame);
+            for (int i = 0; i < desc->nb_components; i++) {
+                int shift = i ? desc->log2_chroma_h : 0;
+                int bytes = desc->comp[0].depth == 8 ? 1 : 2;
+                rav1e_frame_fill_plane(rframe, i, frame->data[i],
+                                       (frame->height >> shift) * frame->linesize[i],
+                                       frame->linesize[i], bytes);
+            }
+            av_frame_unref(frame);
         }
     }
 
@@ -468,7 +468,7 @@ static int librav1e_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
         if (ret == RA_ENCODER_STATUS_ENOUGH_DATA) {
             ctx->rframe = rframe; /* Queue is full. Store the RaFrame to retry next call */
         } else {
-         rav1e_frame_unref(rframe); /* No need to unref if flushing. */
+            rav1e_frame_unref(rframe); /* No need to unref if flushing. */
             ctx->rframe = NULL;
         }
 



More information about the ffmpeg-cvslog mailing list