diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2011-07-22 15:34:48 +0200 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2011-07-22 15:42:26 +0200 |
commit | 2f91c9e8c199cebd45288574d9b8889b49932a0c (patch) | |
tree | 39180805fad3b9c964c8c415d937fd57732ac9e4 /gst-libs | |
parent | ab6efa04cae5750e32c75e3245ae654d68d6ca47 (diff) |
Report caps update only once per video resolution change.
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.c b/gst-libs/gst/vaapi/gstvaapidecoder.c index 006e17bb..58242ba7 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder.c @@ -440,24 +440,24 @@ gst_vaapi_decoder_set_picture_size( ) { GstVaapiDecoderPrivate * const priv = decoder->priv; - - g_object_freeze_notify(G_OBJECT(decoder)); + gboolean size_changed = FALSE; if (priv->width != width) { GST_DEBUG("picture width changed to %d", width); priv->width = width; gst_caps_set_simple(priv->caps, "width", G_TYPE_INT, width, NULL); - g_object_notify(G_OBJECT(decoder), "caps"); + size_changed = TRUE; } if (priv->height != height) { GST_DEBUG("picture height changed to %d", height); priv->height = height; gst_caps_set_simple(priv->caps, "height", G_TYPE_INT, height, NULL); - g_object_notify(G_OBJECT(decoder), "caps"); + size_changed = TRUE; } - g_object_thaw_notify(G_OBJECT(decoder)); + if (size_changed) + g_object_notify(G_OBJECT(decoder), "caps"); } void |