Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 41de2ec64ab06bb58c82c1659adaa3811bc5bcf8 Mon Sep 17 00:00:00 2001 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2 | From: zhouming <b42586@freescale.com> |
| 3 | Date: Wed, 14 May 2014 10:16:20 +0800 |
| 4 | Subject: [PATCH] ENGR00312515: get caps from src pad when query caps |
| 5 | |
| 6 | https://bugzilla.gnome.org/show_bug.cgi?id=728312 |
| 7 | |
| 8 | Upstream-Status: Pending |
| 9 | |
| 10 | Signed-off-by: zhouming <b42586@freescale.com> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 11 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | --- |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 13 | gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 14 | 1 file changed, 13 insertions(+) |
| 15 | mode change 100644 => 100755 gst-libs/gst/tag/gsttagdemux.c |
| 16 | |
| 17 | diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c |
| 18 | old mode 100644 |
| 19 | new mode 100755 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 20 | index 8a127c8..71c5d78 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | --- a/gst-libs/gst/tag/gsttagdemux.c |
| 22 | +++ b/gst-libs/gst/tag/gsttagdemux.c |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 23 | @@ -1759,6 +1759,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 24 | } |
| 25 | break; |
| 26 | } |
| 27 | + case GST_QUERY_CAPS: |
| 28 | + { |
| 29 | + |
| 30 | + /* We can hijack caps query if we typefind already */ |
| 31 | + if (demux->priv->src_caps) { |
| 32 | + gst_query_set_caps_result (query, demux->priv->src_caps); |
| 33 | + res = TRUE; |
| 34 | + } else { |
| 35 | + res = gst_pad_query_default (pad, parent, query); |
| 36 | + } |
| 37 | + break; |
| 38 | + } |
| 39 | + |
| 40 | default: |
| 41 | res = gst_pad_query_default (pad, parent, query); |
| 42 | break; |