From: Wim Taymans Date: Mon, 20 Feb 2012 14:17:29 +0000 (+0100) Subject: playback: find raw caps correctly X-Git-Tag: RELEASE-0.11.3~97 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4370d42cb9928d894904cbf769f2e33c30b4b0ee;p=platform%2Fupstream%2Fgst-plugins-base.git playback: find raw caps correctly --- diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index 05f45fc..e53b49c 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -2895,8 +2895,7 @@ is_raw_structure (GstStructure * s) name = gst_structure_get_name (s); - if (g_str_has_prefix (name, "video/x-raw") || - g_str_has_prefix (name, "audio/x-raw")) + if (g_str_equal (name, "video/x-raw") || g_str_equal (name, "audio/x-raw")) return TRUE; return FALSE; } diff --git a/gst/playback/gstplaysinkconvertbin.c b/gst/playback/gstplaysinkconvertbin.c index 1a78d46..eaa99b4 100644 --- a/gst/playback/gstplaysinkconvertbin.c +++ b/gst/playback/gstplaysinkconvertbin.c @@ -54,13 +54,13 @@ is_raw_caps (GstCaps * caps, gboolean audio) gint i, n; GstStructure *s; const gchar *name; - const gchar *prefix = audio ? "audio/x-raw-" : "video/x-raw-"; + const gchar *prefix = audio ? "audio/x-raw" : "video/x-raw"; n = gst_caps_get_size (caps); for (i = 0; i < n; i++) { s = gst_caps_get_structure (caps, i); name = gst_structure_get_name (s); - if (!g_str_has_prefix (name, prefix)) + if (!g_str_equal (name, prefix)) return FALSE; } @@ -333,9 +333,9 @@ gst_play_sink_convert_bin_sink_setcaps (GstPlaySinkConvertBin * self, name = gst_structure_get_name (s); if (self->audio) { - raw = g_str_has_prefix (name, "audio/x-raw-"); + raw = g_str_equal (name, "audio/x-raw"); } else { - raw = g_str_has_prefix (name, "video/x-raw-"); + raw = g_str_equal (name, "video/x-raw"); } GST_DEBUG_OBJECT (self, "raw %d, self->raw %d, blocked %d", diff --git a/gst/playback/gstsubtitleoverlay.c b/gst/playback/gstsubtitleoverlay.c index fb72ae8..d00281d 100644 --- a/gst/playback/gstsubtitleoverlay.c +++ b/gst/playback/gstsubtitleoverlay.c @@ -232,7 +232,7 @@ _is_raw_video (GstStructure * s) name = gst_structure_get_name (s); - if (g_str_has_prefix (name, "video/x-raw")) + if (g_str_equal (name, "video/x-raw")) return TRUE; return FALSE; } @@ -256,7 +256,7 @@ _is_video_pad (GstPad * pad, gboolean * hw_accelerated) } name = gst_structure_get_name (gst_caps_get_structure (caps, 0)); - if (!strcmp (name, "video/x-raw")) { + if (g_str_equal (name, "video/x-raw")) { ret = TRUE; if (hw_accelerated) *hw_accelerated = FALSE;