+2008-08-16 Edward Hervey <edward.hervey@collabora.co.uk>
+
+ * gst/avi/gstavidemux.c: (gst_avi_demux_read_subindexes_pull),
+ (gst_avi_demux_read_subindexes_push):
+ Some AVI 2.0 (ODML) files don't respect the 'specifications' completely
+ and instead of using the 'ix##' nomenclature, use '##ix'.
+ They're still valid though, this fixes the duration and indexes for
+ virtually all the ODML files I have.
+
2008-08-15 Wim Taymans <wim.taymans@collabora.co.uk>
Patch by: Olivier Crete <tester at tester dot ca>
for (i = 0; stream->indexes[i] != GST_BUFFER_OFFSET_NONE; i++) {
if (!gst_avi_demux_peek_chunk (avi, &tag, &size))
continue;
- else if (tag != GST_MAKE_FOURCC ('i', 'x', '0' + stream->num / 10,
- '0' + stream->num % 10)) {
+ else if ((tag != GST_MAKE_FOURCC ('i', 'x', '0' + stream->num / 10,
+ '0' + stream->num % 10)) &&
+ (tag != GST_MAKE_FOURCC ('0' + stream->num / 10,
+ '0' + stream->num % 10, 'i', 'x'))) {
GST_WARNING_OBJECT (avi, "Not an ix## chunk (%" GST_FOURCC_FORMAT ")",
GST_FOURCC_ARGS (tag));
continue;
if (gst_riff_read_chunk (GST_ELEMENT (avi), avi->sinkpad,
&stream->indexes[i], &tag, &buf) != GST_FLOW_OK)
continue;
- else if (tag != GST_MAKE_FOURCC ('i', 'x', '0' + stream->num / 10,
- '0' + stream->num % 10)) {
+ else if ((tag != GST_MAKE_FOURCC ('i', 'x', '0' + stream->num / 10,
+ '0' + stream->num % 10)) &&
+ (tag != GST_MAKE_FOURCC ('0' + stream->num / 10,
+ '0' + stream->num % 10, 'i', 'x'))) {
+ /* Some ODML files (created by god knows what muxer) have a ##ix format
+ * instead of the 'official' ix##. They are still valid though. */
GST_WARNING_OBJECT (avi, "Not an ix## chunk (%" GST_FOURCC_FORMAT ")",
GST_FOURCC_ARGS (tag));
gst_buffer_unref (buf);