mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
adpcmdec: fix up for GstAudioDecoder API change
This commit is contained in:
parent
43da3e6f9e
commit
b66e84040b
1 changed files with 5 additions and 9 deletions
|
@ -89,7 +89,7 @@ adpcmdec_set_format (GstAudioDecoder * bdec, GstCaps * in_caps)
|
||||||
ADPCMDec *dec = (ADPCMDec *) (bdec);
|
ADPCMDec *dec = (ADPCMDec *) (bdec);
|
||||||
GstStructure *structure = gst_caps_get_structure (in_caps, 0);
|
GstStructure *structure = gst_caps_get_structure (in_caps, 0);
|
||||||
const gchar *layout;
|
const gchar *layout;
|
||||||
GstCaps *caps;
|
GstAudioInfo info;
|
||||||
|
|
||||||
layout = gst_structure_get_string (structure, "layout");
|
layout = gst_structure_get_string (structure, "layout");
|
||||||
if (!layout)
|
if (!layout)
|
||||||
|
@ -110,15 +110,11 @@ adpcmdec_set_format (GstAudioDecoder * bdec, GstCaps * in_caps)
|
||||||
if (!gst_structure_get_int (structure, "channels", &dec->channels))
|
if (!gst_structure_get_int (structure, "channels", &dec->channels))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
caps = 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, GST_AUDIO_FORMAT_S16, dec->rate,
|
||||||
"layout", G_TYPE_STRING, "interleaved",
|
dec->channels, NULL);
|
||||||
"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_decoder_set_output_format (bdec, &info);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue