diff mbox series

[FFmpeg-devel,1/2] avcodec/librav1e: Fix indentation

Message ID 20210114135558.58119-1-derek.buitenhuis@gmail.com
State Accepted
Commit b085a72c54ced391d4e1cd00d2a2959b5a5704e6
Headers show
Series [FFmpeg-devel,1/2] avcodec/librav1e: Fix indentation
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Derek Buitenhuis Jan. 14, 2021, 1:55 p.m. UTC
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
---
Seems it got mangled at some point.
---
 libavcodec/librav1e.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

Comments

Derek Buitenhuis Jan. 16, 2021, 4:38 p.m. UTC | #1
On 14/01/2021 13:55, Derek Buitenhuis wrote:
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
> ---
> Seems it got mangled at some point.
> ---
>  libavcodec/librav1e.c | 32 ++++++++++++++++----------------
>  1 file changed, 16 insertions(+), 16 deletions(-)

Will push both of these tomorrow if nobody objects.

- Derek
Derek Buitenhuis Jan. 17, 2021, 12:43 p.m. UTC | #2
On 17/01/2021 12:38, Derek Buitenhuis wrote:
> --- a/libavcodec/av1dec.c
> +++ b/libavcodec/av1dec.c
> @@ -929,7 +929,7 @@ static int av1_decode_frame(AVCodecContext *avctx, void *frame,
>  
>              s->operating_point_idc = s->raw_seq->operating_point_idc[s->operating_point];
>  
> -            if (s->pix_fmt == AV_PIX_FMT_NONE) {
> +            if (avctx->pix_fmt == AV_PIX_FMT_NONE) {
>                  ret = get_pixel_format(avctx);
>                  if (ret < 0) {

Eugh, I amended too hard. v3 sent.

- Derek
diff mbox series

Patch

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;
         }