[MOVED FROM BAD 49/57] Add support for ECMA arrays in script tags. Fixes bug #567965.

Add support for ECMA arrays in script tags. This fixes
seeking on some files that have the seek table stored
inside an ECMA array instead of the normal array.
This commit is contained in:
Jan Urbanski 2009-01-22 13:39:34 +01:00 committed by Sebastian Dröge
parent 351a29c1df
commit 6d82cda0ff

View file

@ -206,6 +206,29 @@ gst_flv_parse_metadata_item (GstFLVDemux * demux, GstByteReader * reader,
break;
}
case 8: // ECMA array
{
guint32 nb_elems;
gboolean end_of_object_marker = FALSE;
if (!gst_byte_reader_get_uint32_be (reader, &nb_elems))
goto error;
GST_DEBUG_OBJECT (demux, "there are approx. %d elements in the array",
nb_elems);
while (!end_of_object_marker) {
gboolean ok =
gst_flv_parse_metadata_item (demux, reader, &end_of_object_marker);
if (G_UNLIKELY (!ok)) {
GST_WARNING_OBJECT (demux, "failed reading a tag, skipping");
goto error;
}
}
break;
}
case 9: // End marker
{
GST_DEBUG_OBJECT (demux, "end marker ?");