summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-12-17 15:01:02 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-12-22 10:38:56 +0100
commit2e9fe4ed9b3f10c1a1d4db7bde9a068ab4a6967b (patch)
treef43e6e9d5884f73c32ec4c247dc734bcf46ee2cc
parent3af19542c29a66ee34d3c9b06bb7290be3f28341 (diff)
audioparsers: Use the peer caps for restrictions instead of the srcpad allowed caps
Otherwise we will intersect with the srcpad template caps and add all the caps fields that the parser will ever set, no matter if downstream restricts this field or not. This requires upstream to set this field on the caps to successfully negotiate. https://bugzilla.gnome.org/show_bug.cgi?id=690184
-rw-r--r--gst/audioparsers/gstaacparse.c2
-rw-r--r--gst/audioparsers/gstac3parse.c2
-rw-r--r--gst/audioparsers/gstamrparse.c2
-rw-r--r--gst/audioparsers/gstdcaparse.c2
-rw-r--r--gst/audioparsers/gstflacparse.c2
-rw-r--r--gst/audioparsers/gstmpegaudioparse.c2
-rw-r--r--gst/audioparsers/gstwavpackparse.c2
7 files changed, 7 insertions, 7 deletions
diff --git a/gst/audioparsers/gstaacparse.c b/gst/audioparsers/gstaacparse.c
index 9dd414c04..d154929b6 100644
--- a/gst/audioparsers/gstaacparse.c
+++ b/gst/audioparsers/gstaacparse.c
@@ -1100,7 +1100,7 @@ gst_aac_parse_sink_getcaps (GstBaseParse * parse, GstCaps * filter)
GstCaps *res;
templ = gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse));
- peercaps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (parse));
+ peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
if (peercaps) {
guint i, n;
diff --git a/gst/audioparsers/gstac3parse.c b/gst/audioparsers/gstac3parse.c
index 9e24159ad..f2c84405f 100644
--- a/gst/audioparsers/gstac3parse.c
+++ b/gst/audioparsers/gstac3parse.c
@@ -697,7 +697,7 @@ gst_ac3_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
GstCaps *res;
templ = gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse));
- peercaps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (parse));
+ peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
if (peercaps) {
guint i, n;
diff --git a/gst/audioparsers/gstamrparse.c b/gst/audioparsers/gstamrparse.c
index 2fb44f24e..d66fabe3c 100644
--- a/gst/audioparsers/gstamrparse.c
+++ b/gst/audioparsers/gstamrparse.c
@@ -370,7 +370,7 @@ gst_amr_parse_sink_getcaps (GstBaseParse * parse, GstCaps * filter)
templ = gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse));
- peercaps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (parse));
+ peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
if (peercaps) {
guint i, n;
diff --git a/gst/audioparsers/gstdcaparse.c b/gst/audioparsers/gstdcaparse.c
index 91d42617b..06527f11f 100644
--- a/gst/audioparsers/gstdcaparse.c
+++ b/gst/audioparsers/gstdcaparse.c
@@ -447,7 +447,7 @@ gst_dca_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
GstCaps *res;
templ = gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse));
- peercaps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (parse));
+ peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
if (peercaps) {
guint i, n;
diff --git a/gst/audioparsers/gstflacparse.c b/gst/audioparsers/gstflacparse.c
index 8fde5a126..54e1f79ce 100644
--- a/gst/audioparsers/gstflacparse.c
+++ b/gst/audioparsers/gstflacparse.c
@@ -1741,7 +1741,7 @@ gst_flac_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
GstCaps *res;
templ = gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse));
- peercaps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (parse));
+ peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
if (peercaps) {
guint i, n;
diff --git a/gst/audioparsers/gstmpegaudioparse.c b/gst/audioparsers/gstmpegaudioparse.c
index 62cc5b43b..254289f37 100644
--- a/gst/audioparsers/gstmpegaudioparse.c
+++ b/gst/audioparsers/gstmpegaudioparse.c
@@ -1405,7 +1405,7 @@ gst_mpeg_audio_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
GstCaps *res;
templ = gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse));
- peercaps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (parse));
+ peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
if (peercaps) {
guint i, n;
diff --git a/gst/audioparsers/gstwavpackparse.c b/gst/audioparsers/gstwavpackparse.c
index 7c53e7b30..a72a63137 100644
--- a/gst/audioparsers/gstwavpackparse.c
+++ b/gst/audioparsers/gstwavpackparse.c
@@ -615,7 +615,7 @@ gst_wavpack_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
GstCaps *res;
templ = gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse));
- peercaps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (parse));
+ peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
if (peercaps) {
guint i, n;