diff --git a/ChangeLog b/ChangeLog index b44affeaa1..3792b66b1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-04-25 Stefan Kost + + * gst/wavparse/gstwavparse.c: (gst_wavparse_stream_headers): + Make header field check conditional. Fixes #433135 + 2007-04-24 Tim-Philipp Müller * docs/plugins/Makefile.am: diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index 8c3590f469..e79d352496 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -1078,10 +1078,6 @@ gst_wavparse_stream_headers (GstWavParse * wav) /* do more sanity checks of header fields * (these can be sanitized by gst_riff_create_audio_caps() */ - if (header->blockalign > - header->channels * (guint) ceil (header->size / 8.0)) - goto invalid_blockalign; - wav->format = header->format; wav->rate = header->rate; wav->channels = header->channels; @@ -1102,6 +1098,10 @@ gst_wavparse_stream_headers (GstWavParse * wav) wav->bps = 0; break; } + case GST_RIFF_WAVE_FORMAT_PCM: + if (wav->blockalign > wav->channels * (guint) ceil (wav->depth / 8.0)) + goto invalid_blockalign; + /* fall through */ default: if (wav->av_bps > wav->blockalign * wav->rate) goto invalid_bps; @@ -1317,7 +1317,6 @@ invalid_blockalign: ("Stream claims blockalign = %u, which is more than %u - invalid data", header->blockalign, header->channels * (guint) ceil (header->size / 8.0))); - g_free (header); g_free (codec_name); return GST_FLOW_ERROR; }