gst/wavparse/gstwavparse.c: Throw error if we didn't recognize the stream. Fixes #152289.

Original commit message from CVS:
Reviewed by: Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
* gst/wavparse/gstwavparse.c: (gst_wavparse_fmt):
Throw error if we didn't recognize the stream. Fixes #152289.
This commit is contained in:
Ronald S. Bultje 2004-10-01 12:39:08 +00:00
parent abd45313bf
commit 978550fe3c
2 changed files with 13 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2004-10-01 Sebastien Cote <sc5@hermes.usherb.ca>
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/wavparse/gstwavparse.c: (gst_wavparse_fmt):
Throw error if we didn't recognize the stream. Fixes #152289.
2004-10-01 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/videoscale/gstvideoscale.c: (gst_videoscale_link):

View file

@ -533,8 +533,6 @@ gst_wavparse_fmt (GstWavParse * wav)
return FALSE;
}
gst_wavparse_create_sourcepad (wav);
wav->format = header->format;
wav->rate = header->rate;
wav->channels = header->channels;
@ -545,13 +543,17 @@ gst_wavparse_fmt (GstWavParse * wav)
caps = gst_riff_create_audio_caps (header->format, NULL, header, NULL);
if (caps) {
gst_wavparse_create_sourcepad (wav);
gst_pad_set_explicit_caps (wav->srcpad, caps);
gst_caps_free (caps);
gst_element_add_pad (GST_ELEMENT (wav), wav->srcpad);
GST_DEBUG ("frequency %d, channels %d", wav->rate, wav->channels);
} else {
GST_ELEMENT_ERROR (wav, STREAM, TYPE_NOT_FOUND, (NULL), (NULL));
return FALSE;
}
gst_element_add_pad (GST_ELEMENT (wav), wav->srcpad);
GST_DEBUG ("frequency %d, channels %d", wav->rate, wav->channels);
g_free (header);