gst-libs/gst/riff/riff-media.c: Do actually fix invalid RIFF fmt header values for alaw and mulaw audio instead of ju...

Original commit message from CVS:
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_audio_caps_with_data):
Do actually fix invalid RIFF fmt header values for alaw
and mulaw audio instead of just saying so.

* gst/wavparse/gstwavparse.c: (gst_wavparse_fmt):
Give gst_riff_create_audio_caps_with_data() a chance to
fix up broken format header fields before extracting any
parameters from the header. (fixes #167633)
This commit is contained in:
Tim-Philipp Müller 2005-02-20 12:49:19 +00:00
parent 60dd9fbc4d
commit 7448ede81d
2 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,15 @@
2005-02-20 Tim-Philipp Müller <tim at centricular dot net>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_audio_caps_with_data):
Do actually fix invalid RIFF fmt header values for alaw
and mulaw audio instead of just saying so.
* gst/wavparse/gstwavparse.c: (gst_wavparse_fmt):
Give gst_riff_create_audio_caps_with_data() a chance to
fix up broken format header fields before extracting any
parameters from the header. (fixes #167633)
2005-02-19 Martin Holters <martin.holters@gmx.de>
Reviewed by: Tim-Philipp Müller <tim at centricular dot net>

View file

@ -545,6 +545,10 @@ gst_wavparse_fmt (GstWavParse * wav)
return FALSE;
}
/* Note: gst_riff_create_audio_caps might nedd to fix values in
* the header header depending on the format, so call it first */
caps = gst_riff_create_audio_caps (header->format, NULL, header, NULL);
wav->format = header->format;
wav->rate = header->rate;
wav->channels = header->channels;
@ -553,7 +557,6 @@ gst_wavparse_fmt (GstWavParse * wav)
wav->depth = header->size;
wav->bps = header->av_bps;
caps = gst_riff_create_audio_caps (header->format, NULL, header, NULL);
g_free (header);
if (caps) {