forked from ~ljy/RK356X_SDK_RELEASE

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