Commit 7448ede8 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

gst-libs/gst/riff/riff-media.c: Do actually fix invalid RIFF fmt header values...

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)
parent 60dd9fbc
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> 2005-02-19 Martin Holters <martin.holters@gmx.de>
Reviewed by: Tim-Philipp Müller <tim at centricular dot net> Reviewed by: Tim-Philipp Müller <tim at centricular dot net>
......
...@@ -545,6 +545,10 @@ gst_wavparse_fmt (GstWavParse * wav) ...@@ -545,6 +545,10 @@ gst_wavparse_fmt (GstWavParse * wav)
return FALSE; 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->format = header->format;
wav->rate = header->rate; wav->rate = header->rate;
wav->channels = header->channels; wav->channels = header->channels;
...@@ -553,7 +557,6 @@ gst_wavparse_fmt (GstWavParse * wav) ...@@ -553,7 +557,6 @@ gst_wavparse_fmt (GstWavParse * wav)
wav->depth = header->size; wav->depth = header->size;
wav->bps = header->av_bps; wav->bps = header->av_bps;
caps = gst_riff_create_audio_caps (header->format, NULL, header, NULL);
g_free (header); g_free (header);
if (caps) { if (caps) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment