vorbis: Use new audio encoder/decoder base class API for srcpad caps
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 1 Feb 2012 15:04:03 +0000 (16:04 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 1 Feb 2012 15:27:47 +0000 (16:27 +0100)
ext/vorbis/gstvorbisdec.c
ext/vorbis/gstvorbisenc.c

index 8c5a328..48f318b 100644 (file)
@@ -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
index 91ace3b..5162b92 100644 (file)
@@ -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 */