mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
gst-libs/gst/riff/riff-media.c: Set the maximum number of channels for PCM and float in the correct place to have it ...
Original commit message from CVS: * gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps): Set the maximum number of channels for PCM and float in the correct place to have it also used when creating the template caps.
This commit is contained in:
parent
3effb4d23e
commit
cef23b669c
2 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-04-17 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
|
||||
Set the maximum number of channels for PCM and float in the correct
|
||||
place to have it also used when creating the template caps.
|
||||
|
||||
2007-04-17 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
|
||||
|
|
|
@ -753,14 +753,14 @@ gst_riff_create_audio_caps (guint16 codec_id,
|
|||
|
||||
switch (codec_id) {
|
||||
case GST_RIFF_WAVE_FORMAT_PCM: /* PCM */
|
||||
channels_max = 8;
|
||||
|
||||
if (strf != NULL) {
|
||||
gint ba = strf->blockalign;
|
||||
gint ch = strf->channels;
|
||||
gint wd = ba * 8 / ch;
|
||||
gint ws;
|
||||
|
||||
channels_max = 8;
|
||||
|
||||
if (strf->size > 32) {
|
||||
GST_WARNING ("invalid depth (%d) of pcm audio, overwriting.",
|
||||
strf->size);
|
||||
|
@ -827,13 +827,13 @@ gst_riff_create_audio_caps (guint16 codec_id,
|
|||
break;
|
||||
|
||||
case GST_RIFF_WAVE_FORMAT_IEEE_FLOAT:
|
||||
channels_max = 8;
|
||||
|
||||
if (strf != NULL) {
|
||||
gint ba = strf->blockalign;
|
||||
gint ch = strf->channels;
|
||||
gint wd = ba * 8 / ch;
|
||||
|
||||
channels_max = 8;
|
||||
|
||||
caps = gst_caps_new_simple ("audio/x-raw-float",
|
||||
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
|
||||
"channels", G_TYPE_INT, ch, "width", G_TYPE_INT, wd, NULL);
|
||||
|
|
Loading…
Reference in a new issue