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

This commit is contained in:
Sebastian Dröge 2012-02-01 16:15:27 +01:00
parent 20b889a588
commit 77c41a22f0

View file

@ -139,7 +139,7 @@ gst_amrwbdec_set_format (GstAudioDecoder * dec, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
GstAmrwbDec *amrwbdec; GstAmrwbDec *amrwbdec;
GstCaps *copy; GstAudioInfo info;
amrwbdec = GST_AMRWBDEC (dec); amrwbdec = GST_AMRWBDEC (dec);
@ -150,14 +150,11 @@ gst_amrwbdec_set_format (GstAudioDecoder * dec, GstCaps * caps)
gst_structure_get_int (structure, "rate", &amrwbdec->rate); gst_structure_get_int (structure, "rate", &amrwbdec->rate);
/* create reverse caps */ /* create reverse caps */
copy = gst_caps_new_simple ("audio/x-raw", gst_audio_info_init (&info);
"format", G_TYPE_STRING, GST_AUDIO_NE (S16), gst_audio_info_set_format (&info,
"layout", G_TYPE_STRING, "interleaved", GST_AUDIO_FORMAT_S16, amrwbdec->rate, amrwbdec->channels, NULL);
"channels", G_TYPE_INT, amrwbdec->channels,
"rate", G_TYPE_INT, amrwbdec->rate, NULL);
gst_audio_decoder_set_outcaps (dec, copy); gst_audio_decoder_set_output_format (dec, &info);
gst_caps_unref (copy);
return TRUE; return TRUE;
} }