From: Niklas Haas <g...@haasn.dev>

Avoids an unnecessary copy of the frame in the frame queue when not
deinterlacing anyways.
---
 libavfilter/vf_libplacebo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index fbbc9d5cb7..933b086b69 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -972,7 +972,7 @@ static int handle_input(AVFilterContext *ctx, 
LibplaceboInput *input)
         pl_queue_push(input->queue, &(struct pl_source_frame) {
             .pts         = in->pts * av_q2d(inlink->time_base),
             .duration    = in->duration * av_q2d(inlink->time_base),
-            .first_field = pl_field_from_avframe(in),
+            .first_field = s->deinterlace ? pl_field_from_avframe(in) : 
PL_FIELD_NONE,
             .frame_data  = in,
             .map         = map_frame,
             .unmap       = unmap_frame,
-- 
2.47.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to