summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunjun Ko <zzoon@igalia.com>2017-07-12 18:25:15 +0900
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-08-23 20:02:55 +0200
commitc64e05d3d2d2cf29bd07d136f6357cb78384daac (patch)
treee48c3afbefbee297ed2a990937dfb9b7e873ea19
parente43c47e20c147c13f75dd3356dfa404d5e954b15 (diff)
postproc: reconfigure when width or height changes
https://bugzilla.gnome.org/show_bug.cgi?id=754885
-rw-r--r--gst/vaapi/gstvaapipostproc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c
index d45f7ee9..d67cdfc4 100644
--- a/gst/vaapi/gstvaapipostproc.c
+++ b/gst/vaapi/gstvaapipostproc.c
@@ -1430,6 +1430,7 @@ gst_vaapipostproc_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec)
{
GstVaapiPostproc *const postproc = GST_VAAPIPOSTPROC (object);
+ gboolean do_reconf = FALSE;
g_mutex_lock (&postproc->postproc_lock);
switch (prop_id) {
@@ -1437,11 +1438,19 @@ gst_vaapipostproc_set_property (GObject * object,
postproc->format = g_value_get_enum (value);
break;
case PROP_WIDTH:
+ {
+ guint prev_width = postproc->width;
postproc->width = g_value_get_uint (value);
+ do_reconf = (prev_width != postproc->width);
break;
+ }
case PROP_HEIGHT:
+ {
+ guint prev_height = postproc->height;
postproc->height = g_value_get_uint (value);
+ do_reconf = (prev_height != postproc->height);
break;
+ }
case PROP_FORCE_ASPECT_RATIO:
postproc->keep_aspect = g_value_get_boolean (value);
break;
@@ -1489,7 +1498,7 @@ gst_vaapipostproc_set_property (GObject * object,
}
g_mutex_unlock (&postproc->postproc_lock);
- if (check_filter_update (postproc))
+ if (do_reconf || check_filter_update (postproc))
gst_base_transform_reconfigure_src (GST_BASE_TRANSFORM (postproc));
}