+2004-04-22 Ronald Bultje <rbultje@ronald.bitfreak.net>
+
+ * gst/wavparse/gstwavparse.c: (gst_wavparse_create_sourcepad),
+ (gst_wavparse_parse_fmt), (gst_wavparse_handle_sink_event),
+ (gst_wavparse_loop):
+ Missing variable initialization. Add handling of DVI ADPCM. Fix
+ mis-parsing of LIST chunks. This works around a bug where we mis-
+ parse non-aligning LIST chunks (so LIST chunks where the contents
+ don't align with the actual LIST size). The correct fix is to use
+ rifflib, I'm not going to fix wavparse - too much work. All this
+ fixes #104878.
+
2004-04-22 Zaheer Abbas Merali <zaheerabbas@merali.org>
reviewed by Benjamin Otte <otte@gnome.org>
"audio/x-adpcm, "
"layout = (string) microsoft, "
"block_align = (int) [ 1, 8192 ], "
+ "rate = (int) [ 8000, 48000 ], "
+ "channels = (int) [ 1, 2 ]; "
+ "audio/x-adpcm, "
+ "layout = (string) dvi, "
+ "block_align = (int) [ 1, 8192 ], "
"rate = (int) [ 8000, 48000 ], " "channels = (int) [ 1, 2 ]")
);
(&src_template_factory), "src");
gst_pad_use_explicit_caps (wavparse->srcpad);
/*gst_element_add_pad (GST_ELEMENT (wavparse), wavparse->srcpad); */
+ /*gst_element_add_pad (GST_ELEMENT (wavparse), wavparse->srcpad); */
gst_pad_set_formats_function (wavparse->srcpad, gst_wavparse_get_formats);
gst_pad_set_convert_function (wavparse->srcpad, gst_wavparse_pad_convert);
gst_pad_set_query_type_function (wavparse->srcpad,
"channels", G_TYPE_INT, wavparse->channels, NULL);
break;
+ case GST_RIFF_WAVE_FORMAT_DVI_ADPCM:
+ caps = gst_caps_new_simple ("audio/x-adpcm",
+ "layout", G_TYPE_STRING, "dvi",
+ "block_align", G_TYPE_INT, wavparse->bps,
+ "rate", G_TYPE_INT, wavparse->rate,
+ "channels", G_TYPE_INT, wavparse->channels, NULL);
+ break;
+
case GST_RIFF_WAVE_FORMAT_MPEGL12:
case GST_RIFF_WAVE_FORMAT_MPEGL3:{
int layer = (wavparse->format == GST_RIFF_WAVE_FORMAT_MPEGL12) ? 2 : 3;
break;
default:
- g_warning ("Wavparse: Unhandled event %d", type);
- break;
+ GST_WARNING ("Wavparse: Unhandled event %d", type);
+ gst_pad_event_default (wavparse->sinkpad, event);
+ goto done;
}
gst_event_unref (event);
chunk.type = GUINT32_FROM_LE (temp_chunk->type);
skipsize = sizeof (gst_riff_list);
+ chunk.size -= 4; /* size is including list type, which we flush */
break;
case GST_RIFF_TAG_cue:
//flush = 0;
break;
}
+ break;
default:
GST_DEBUG (" ***** unknown chunkid %08x", chunk.id);