+2008-11-30 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
+ * gst/mxf/mxfdemux.c: (gst_mxf_demux_pull_random_index_pack):
+ Make sure that demux->offset has the correct value before
+ calling any gst_mxf_demux_handle_* functions.
+
2008-11-30 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/mxf/mxfjpeg2000.c: (mxf_jpeg2000_create_caps):
MXFMetadataEssenceContainerData, i);
for (j = 0; j < demux->content_storage.n_essence_container_data; j++) {
- if (mxf_ul_is_equal (&demux->
- content_storage.essence_container_data_uids[j],
- &data->instance_uid)) {
+ if (mxf_ul_is_equal (&demux->content_storage.
+ essence_container_data_uids[j], &data->instance_uid)) {
demux->content_storage.essence_container_data[j] = data;
break;
}
gint64 filesize = -1;
GstFormat fmt = GST_FORMAT_BYTES;
guint32 pack_size;
+ guint64 old_offset = demux->offset;
MXFUL key;
if (!gst_pad_query_peer_duration (demux->sinkpad, &fmt, &filesize) ||
gst_buffer_unref (buffer);
if (pack_size < 20) {
- GST_DEBUG_OBJECT (demux, "Too small pack size");
+ GST_DEBUG_OBJECT (demux, "Too small pack size (%u bytes)", pack_size);
goto out;
} else if (pack_size > filesize - 20) {
- GST_DEBUG_OBJECT (demux, "Too large pack size");
+ GST_DEBUG_OBJECT (demux, "Too large pack size (%u bytes)", pack_size);
goto out;
}
goto out;
}
+ demux->offset = filesize - pack_size;
if ((ret =
gst_mxf_demux_pull_klv_packet (demux, filesize - pack_size, &key,
&buffer, NULL)) != GST_FLOW_OK) {
goto out;
}
-
gst_mxf_demux_handle_random_index_pack (demux, &key, buffer);
gst_buffer_unref (buffer);
+ demux->offset = old_offset;
out:
if (!demux->partition_index)