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

Git pushed a commit to branch master
in repository ffmpeg.

commit 7671ac4e128c5f12ad6e5f404aa6c2ca8e63e6f3
Author:     Niklas Haas <[email protected]>
AuthorDate: Fri Oct 30 16:41:50 2026 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Sat Oct 31 13:37:58 2026 +0100

    avfilter/vf_libplacebo: make the reference frame optional in 
set_output_props()
    
    Without a reference frame, only the properties derived from the output link
    and the filter options are set.
    
    Note that the conditional stripping flags (including `progressive`) are
    only needed if we are copying from the ref frame; as a plain allocated
    AVFrame would never have this side data / flags otherwise.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Sponsored-by: nxtedition AB
    Signed-off-by: Niklas Haas <[email protected]>
---
 libavfilter/vf_libplacebo.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index 241a1eb462..5fa9dd4a9f 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -993,15 +993,17 @@ static int set_output_props(LibplaceboContext *s, const 
AVFilterLink *outlink,
 {
     int err, changed = 0;
 
-    if ((err = av_frame_copy_props(out, ref)) < 0)
-        return err;
+    if (ref) {
+        if ((err = av_frame_copy_props(out, ref)) < 0)
+            return err;
 
-    if (s->apply_dovi && av_frame_get_side_data(ref, 
AV_FRAME_DATA_DOVI_METADATA)) {
-        /* Output of dovi reshaping is always BT.2020+PQ, so infer the correct
-         * output colorspace defaults */
-        out->color_primaries = AVCOL_PRI_BT2020;
-        out->color_trc = AVCOL_TRC_SMPTE2084;
-        changed |= AV_SIDE_DATA_PROP_COLOR_DEPENDENT;
+        if (s->apply_dovi && av_frame_get_side_data(ref, 
AV_FRAME_DATA_DOVI_METADATA)) {
+            /* Output of dovi reshaping is always BT.2020+PQ, so infer the 
correct
+             * output colorspace defaults */
+            out->color_primaries = AVCOL_PRI_BT2020;
+            out->color_trc = AVCOL_TRC_SMPTE2084;
+            changed |= AV_SIDE_DATA_PROP_COLOR_DEPENDENT;
+        }
     }
 
     out->width = outlink->w;
@@ -1017,6 +1019,9 @@ static int set_output_props(LibplaceboContext *s, const 
AVFilterLink *outlink,
     if (s->color_primaries >= 0)
         out->color_primaries = s->color_primaries;
 
+    if (!ref)
+        return 0;
+
     /* Strip side data if no longer relevant */
     if (out->width != ref->width || out->height != ref->height)
         changed |= AV_SIDE_DATA_PROP_SIZE_DEPENDENT;

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to