vorbis: Use new audio encoder/decoder base class API for srcpad caps

This commit is contained in:
Sebastian Dröge 2012-02-01 16:04:03 +01:00
parent 0370b0dc12
commit 2fe94cad44
2 changed files with 2 additions and 5 deletions

View file

@ -226,7 +226,6 @@ convert_error:
static GstFlowReturn static GstFlowReturn
vorbis_handle_identification_packet (GstVorbisDec * vd) vorbis_handle_identification_packet (GstVorbisDec * vd)
{ {
GstCaps *caps;
GstAudioInfo info; GstAudioInfo info;
switch (vd->vi.channels) { 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_output_format (GST_AUDIO_DECODER (vd), &info);
gst_audio_decoder_set_outcaps (GST_AUDIO_DECODER (vd), caps);
gst_caps_unref (caps);
vd->info = info; vd->info = info;
/* select a copy_samples function, this way we can have specialized versions /* select a copy_samples function, this way we can have specialized versions

View file

@ -733,7 +733,7 @@ gst_vorbis_enc_handle_frame (GstAudioEncoder * enc, GstBuffer * buffer)
/* negotiate with these caps */ /* negotiate with these caps */
GST_DEBUG_OBJECT (vorbisenc, "here are the caps: %" GST_PTR_FORMAT, 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); gst_caps_unref (caps);
/* store buffers for later pre_push sending */ /* store buffers for later pre_push sending */