From 2fe94cad444ec44007fd7fc68cf9e538688cff06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 1 Feb 2012 16:04:03 +0100 Subject: [PATCH] vorbis: Use new audio encoder/decoder base class API for srcpad caps --- ext/vorbis/gstvorbisdec.c | 5 +---- ext/vorbis/gstvorbisenc.c | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ext/vorbis/gstvorbisdec.c b/ext/vorbis/gstvorbisdec.c index 8c5a3284e7..48f318bed1 100644 --- a/ext/vorbis/gstvorbisdec.c +++ b/ext/vorbis/gstvorbisdec.c @@ -226,7 +226,6 @@ convert_error: static GstFlowReturn vorbis_handle_identification_packet (GstVorbisDec * vd) { - GstCaps *caps; GstAudioInfo info; switch (vd->vi.channels) { @@ -260,9 +259,7 @@ vorbis_handle_identification_packet (GstVorbisDec * vd) } } - caps = gst_audio_info_to_caps (&info); - gst_audio_decoder_set_outcaps (GST_AUDIO_DECODER (vd), caps); - gst_caps_unref (caps); + gst_audio_decoder_set_output_format (GST_AUDIO_DECODER (vd), &info); vd->info = info; /* select a copy_samples function, this way we can have specialized versions diff --git a/ext/vorbis/gstvorbisenc.c b/ext/vorbis/gstvorbisenc.c index 91ace3b5c0..5162b92542 100644 --- a/ext/vorbis/gstvorbisenc.c +++ b/ext/vorbis/gstvorbisenc.c @@ -733,7 +733,7 @@ gst_vorbis_enc_handle_frame (GstAudioEncoder * enc, GstBuffer * buffer) /* negotiate with these caps */ GST_DEBUG_OBJECT (vorbisenc, "here are the caps: %" GST_PTR_FORMAT, caps); - gst_pad_set_caps (GST_AUDIO_ENCODER_SRC_PAD (vorbisenc), caps); + gst_audio_encoder_set_output_format (GST_AUDIO_ENCODER (vorbisenc), caps); gst_caps_unref (caps); /* store buffers for later pre_push sending */