mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
Report caps update only once per video resolution change.
This commit is contained in:
parent
ab6efa04ca
commit
2f91c9e8c1
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue