From 0dd59060d9dc09f551ccf808bfc719457e82ee0d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 9 Feb 2012 15:51:10 +0100 Subject: [PATCH] subtitleoverlay: fix merge error Fix merge error from commit fb6d09055ae90979682fa4b1c6ee4f4abdaafd8f --- gst/playback/gstsubtitleoverlay.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gst/playback/gstsubtitleoverlay.c b/gst/playback/gstsubtitleoverlay.c index cd5af1f..2ac1952 100644 --- a/gst/playback/gstsubtitleoverlay.c +++ b/gst/playback/gstsubtitleoverlay.c @@ -240,10 +240,21 @@ _is_raw_video (GstStructure * s) static gboolean _is_video_pad (GstPad * pad, gboolean * hw_accelerated) { - GstCaps *caps = gst_pad_get_current_caps (pad); + GstPad *peer = gst_pad_get_peer (pad); + GstCaps *caps; gboolean ret; const gchar *name; + if (peer) { + caps = gst_pad_get_current_caps (peer); + if (!caps) { + caps = gst_pad_query_caps (peer, NULL); + } + gst_object_unref (peer); + } else { + caps = gst_pad_query_caps (pad, NULL); + } + name = gst_structure_get_name (gst_caps_get_structure (caps, 0)); if (g_str_has_prefix (name, "video/x-raw-")) { ret = TRUE; -- 2.7.4