From: Ravi Kiran K N Date: Tue, 17 Jun 2014 07:46:27 +0000 (+0530) Subject: videobox: Fix caps negotiation issue X-Git-Tag: 1.3.3~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3c4c130c5e11524b0ea7a849ec1dd213741e93cf;p=platform%2Fupstream%2Fgst-plugins-good.git videobox: Fix caps negotiation issue Make sure that if AYUV is received it will detect that it can produce both RGB and YUV formats Signed-off-by: Ravi Kiran K N https://bugzilla.gnome.org/show_bug.cgi?id=725248 --- diff --git a/gst/videobox/gstvideobox.c b/gst/videobox/gstvideobox.c index 5df2588..861bcae 100644 --- a/gst/videobox/gstvideobox.c +++ b/gst/videobox/gstvideobox.c @@ -2862,22 +2862,27 @@ gst_video_box_transform_caps (GstBaseTransform * trans, for (j = 0; j < gst_value_list_get_size (fval); j++) { lval = gst_value_list_get_value (fval, j); if ((str = g_value_get_string (lval))) { - if (strstr (str, "RGB") || strstr (str, "BGR") || - strcmp (str, "AYUV") == 0) + if (strcmp (str, "AYUV") == 0) { + seen_yuv = TRUE; + seen_rgb = TRUE; + break; + } else if (strstr (str, "RGB") || strstr (str, "BGR")) { seen_rgb = TRUE; - else if (strcmp (str, "I420") == 0 || strcmp (str, "YV12") == 0 || - strcmp (str, "AYUV") == 0) + } else if (strcmp (str, "I420") == 0 || strcmp (str, "YV12") == 0) { seen_yuv = TRUE; + } } } } else if (fval && G_VALUE_HOLDS_STRING (fval)) { if ((str = g_value_get_string (fval))) { - if (strstr (str, "RGB") || strstr (str, "BGR") || - strcmp (str, "AYUV") == 0) + if (strcmp (str, "AYUV") == 0) { + seen_yuv = TRUE; seen_rgb = TRUE; - else if (strcmp (str, "I420") == 0 || strcmp (str, "YV12") == 0 || - strcmp (str, "AYUV") == 0) + } else if (strstr (str, "RGB") || strstr (str, "BGR")) { + seen_rgb = TRUE; + } else if (strcmp (str, "I420") == 0 || strcmp (str, "YV12") == 0) { seen_yuv = TRUE; + } } }