From ed89c9d38fe52e84a6c4a5e5936204669ef88757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 16 May 2011 15:25:34 +0200 Subject: [PATCH] vorbis: Update for negotiation related API changes --- ext/vorbis/gstvorbisenc.c | 8 ++++++-- ext/vorbis/gstvorbisparse.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ext/vorbis/gstvorbisenc.c b/ext/vorbis/gstvorbisenc.c index e422eb689c..31751984fe 100644 --- a/ext/vorbis/gstvorbisenc.c +++ b/ext/vorbis/gstvorbisenc.c @@ -269,14 +269,18 @@ gst_vorbis_enc_generate_sink_caps (void) } static GstCaps * -gst_vorbis_enc_sink_getcaps (GstPad * pad) +gst_vorbis_enc_sink_getcaps (GstPad * pad, GstCaps * filter) { GstVorbisEnc *vorbisenc = GST_VORBISENC (GST_PAD_PARENT (pad)); if (vorbisenc->sinkcaps == NULL) vorbisenc->sinkcaps = gst_vorbis_enc_generate_sink_caps (); - return gst_caps_ref (vorbisenc->sinkcaps); + if (filter) + return gst_caps_intersect_full (filter, vorbisenc->sinkcaps, + GST_CAPS_INTERSECT_FIRST); + else + return gst_caps_ref (vorbisenc->sinkcaps); } static gboolean diff --git a/ext/vorbis/gstvorbisparse.c b/ext/vorbis/gstvorbisparse.c index 163cc3da9f..44783663bf 100644 --- a/ext/vorbis/gstvorbisparse.c +++ b/ext/vorbis/gstvorbisparse.c @@ -188,7 +188,7 @@ vorbis_parse_push_headers (GstVorbisParse * parse) gsize size; /* get the headers into the caps, passing them to vorbis as we go */ - caps = gst_caps_make_writable (gst_pad_get_caps (parse->srcpad)); + caps = gst_caps_make_writable (gst_pad_get_caps (parse->srcpad, NULL)); vorbis_parse_set_header_on_caps (parse, caps); GST_DEBUG_OBJECT (parse, "here are the caps: %" GST_PTR_FORMAT, caps); gst_pad_set_caps (parse->srcpad, caps);