diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-02-01 17:06:11 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-02-01 17:06:11 +0000 |
commit | b66e84040b0c3d4b8522533731d7af2e7386b8f6 (patch) | |
tree | 19d0810af97e20ad3ba25310cae12c5dba27d4fc /gst | |
parent | 43da3e6f9ee5f87614d088b616c04e34cfcb53f6 (diff) | |
download | gstreamer-plugins-bad-b66e84040b0c3d4b8522533731d7af2e7386b8f6.tar.gz |
adpcmdec: fix up for GstAudioDecoder API change
Diffstat (limited to 'gst')
-rw-r--r-- | gst/adpcmdec/adpcmdec.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gst/adpcmdec/adpcmdec.c b/gst/adpcmdec/adpcmdec.c index 3f5824c7b..3b4f47fea 100644 --- a/gst/adpcmdec/adpcmdec.c +++ b/gst/adpcmdec/adpcmdec.c @@ -89,7 +89,7 @@ adpcmdec_set_format (GstAudioDecoder * bdec, GstCaps * in_caps) ADPCMDec *dec = (ADPCMDec *) (bdec); GstStructure *structure = gst_caps_get_structure (in_caps, 0); const gchar *layout; - GstCaps *caps; + GstAudioInfo info; layout = gst_structure_get_string (structure, "layout"); if (!layout) @@ -110,15 +110,11 @@ adpcmdec_set_format (GstAudioDecoder * bdec, GstCaps * in_caps) if (!gst_structure_get_int (structure, "channels", &dec->channels)) return FALSE; - caps = gst_caps_new_simple ("audio/x-raw", - "format", G_TYPE_STRING, GST_AUDIO_NE (S16), - "layout", G_TYPE_STRING, "interleaved", - "rate", G_TYPE_INT, dec->rate, - "channels", G_TYPE_INT, dec->channels, NULL); - - gst_audio_decoder_set_outcaps (bdec, caps); - gst_caps_unref (caps); + gst_audio_info_init (&info); + gst_audio_info_set_format (&info, GST_AUDIO_FORMAT_S16, dec->rate, + dec->channels, NULL); + gst_audio_decoder_set_output_format (bdec, &info); return TRUE; } |