From c8a802772cc2e124e8051f9f63a7bc62f34fd774 Mon Sep 17 00:00:00 2001 From: Jakub Adam Date: Mon, 21 Apr 2025 22:59:18 +0200 Subject: [PATCH] vapostproc: fix wrong video orientation after restarting the element After READY -> NULL -> READY state change, the configured video orientation didn't get applied on the new GstVaFilter instance. Resettig prev_direction to default value in update_properties ensures gst_va_filter_set_orientation() isn't inadvertently skipped. Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvavpp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c index f4a04a8475..bfa1fc583e 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c @@ -432,6 +432,10 @@ gst_va_vpp_update_properties (GstVaBaseTransform * btrans) GstVaVpp *self = GST_VA_VPP (btrans); gst_va_vpp_rebuild_filters (self); + + /* resetting prev_direction ensures the orientation is actually applied to + * the new instance of GstVaFilter we are configuring here */ + self->prev_direction = GST_VIDEO_ORIENTATION_IDENTITY; _update_properties_unlocked (self); }