This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/9.0
in repository ffmpeg.

commit 480bf29af3240416565f0cfce7056f586aa88a5a
Author:     Niklas Haas <[email protected]>
AuthorDate: Fri Jun 26 15:43:45 2026 +0200
Commit:     Marvin Scholz <[email protected]>
CommitDate: Mon Jun 29 18:09:51 2026 +0200

    avfilter/vf_scale_cuda: add fail: label (cosmetic)
    
    Make the next commit a bit easier to review.
    
    Signed-off-by: Niklas Haas <[email protected]>
    (cherry picked from commit 61750318db8298af801098ecee5cc89884b20bb9)
    Signed-off-by: Marvin Scholz <[email protected]>
---
 libavfilter/vf_scale_cuda.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavfilter/vf_scale_cuda.c b/libavfilter/vf_scale_cuda.c
index d429f791b0..d0c3f10f20 100644
--- a/libavfilter/vf_scale_cuda.c
+++ b/libavfilter/vf_scale_cuda.c
@@ -838,26 +838,25 @@ static int cudascale_scale(AVFilterContext *ctx, AVFrame 
*out, AVFrame *in)
 {
     CUDAScaleContext *s = ctx->priv;
     AVFilterLink *outlink = ctx->outputs[0];
-    AVFrame *src = in;
-    int ret;
+    int ret = 0;
 
+    AVFrame *src = in;
     if (s->inter_buf) {
         /* Handle first pass separately */
         s->inter_buf->color_range = in->color_range;
         ret = scalecuda_resize(ctx, FILTER_TMP, s->inter_buf, in);
         if (ret < 0)
-            return ret;
+            goto fail;
         src = s->inter_buf;
     }
 
     ret = scalecuda_resize(ctx, FILTER_OUT, s->frame, src);
     if (ret < 0)
-        return ret;
+        goto fail;
 
-    src = s->frame;
-    ret = av_hwframe_get_buffer(src->hw_frames_ctx, s->tmp_frame, 0);
+    ret = av_hwframe_get_buffer(s->frame->hw_frames_ctx, s->tmp_frame, 0);
     if (ret < 0)
-        return ret;
+        goto fail;
 
     av_frame_move_ref(out, s->frame);
     av_frame_move_ref(s->frame, s->tmp_frame);
@@ -867,14 +866,15 @@ static int cudascale_scale(AVFilterContext *ctx, AVFrame 
*out, AVFrame *in)
 
     ret = av_frame_copy_props(out, in);
     if (ret < 0)
-        return ret;
+        goto fail;
 
     if (out->width != in->width || out->height != in->height) {
         av_frame_side_data_remove_by_props(&out->side_data, &out->nb_side_data,
                                            AV_SIDE_DATA_PROP_SIZE_DEPENDENT);
     }
 
-    return 0;
+fail:
+    return ret;
 }
 
 static int cudascale_filter_frame(AVFilterLink *link, AVFrame *in)

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to