mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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 <ravi.kiran@samsung.com> https://bugzilla.gnome.org/show_bug.cgi?id=725248
This commit is contained in:
parent
054f774455
commit
3c4c130c5e
1 changed files with 15 additions and 10 deletions
|
@ -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)
|
||||
seen_rgb = TRUE;
|
||||
else if (strcmp (str, "I420") == 0 || strcmp (str, "YV12") == 0 ||
|
||||
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) {
|
||||
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)
|
||||
seen_rgb = TRUE;
|
||||
else if (strcmp (str, "I420") == 0 || strcmp (str, "YV12") == 0 ||
|
||||
strcmp (str, "AYUV") == 0)
|
||||
if (strcmp (str, "AYUV") == 0) {
|
||||
seen_yuv = TRUE;
|
||||
seen_rgb = TRUE;
|
||||
} else if (strstr (str, "RGB") || strstr (str, "BGR")) {
|
||||
seen_rgb = TRUE;
|
||||
} else if (strcmp (str, "I420") == 0 || strcmp (str, "YV12") == 0) {
|
||||
seen_yuv = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue