mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
mxfmux: Index table segments must not use the primer pack
According to S377-1-2009c 9.2 the local tags must not be resolved from the primer pack, which as a result means that there can't be any other tags than statically assigned ones.
This commit is contained in:
parent
612f16936c
commit
01f0d16db3
3 changed files with 8 additions and 16 deletions
|
@ -2034,8 +2034,7 @@ gst_mxf_demux_handle_index_table_segment (GstMXFDemux * demux,
|
|||
segment = g_new0 (MXFIndexTableSegment, 1);
|
||||
|
||||
gst_buffer_map (buffer, &map, GST_MAP_READ);
|
||||
ret = mxf_index_table_segment_parse (key, segment,
|
||||
&demux->current_partition->primer, map.data, map.size);
|
||||
ret = mxf_index_table_segment_parse (key, segment, map.data, map.size);
|
||||
gst_buffer_unmap (buffer, &map);
|
||||
|
||||
if (!ret) {
|
||||
|
|
|
@ -1061,8 +1061,7 @@ mxf_random_index_pack_to_buffer (const GArray * array)
|
|||
/* SMPTE 377M 10.2.3 */
|
||||
gboolean
|
||||
mxf_index_table_segment_parse (const MXFUL * ul,
|
||||
MXFIndexTableSegment * segment, const MXFPrimerPack * primer,
|
||||
const guint8 * data, guint size)
|
||||
MXFIndexTableSegment * segment, const guint8 * data, guint size)
|
||||
{
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
gchar str[48];
|
||||
|
@ -1072,7 +1071,6 @@ mxf_index_table_segment_parse (const MXFUL * ul,
|
|||
|
||||
g_return_val_if_fail (ul != NULL, FALSE);
|
||||
g_return_val_if_fail (data != NULL, FALSE);
|
||||
g_return_val_if_fail (primer != NULL, FALSE);
|
||||
|
||||
memset (segment, 0, sizeof (MXFIndexTableSegment));
|
||||
|
||||
|
@ -1265,12 +1263,9 @@ mxf_index_table_segment_parse (const MXFUL * ul,
|
|||
break;
|
||||
}
|
||||
default:
|
||||
if (!primer->mappings) {
|
||||
GST_WARNING ("No valid primer pack for this partition");
|
||||
} else if (!mxf_local_tag_add_to_hash_table (primer, tag, tag_data,
|
||||
tag_size, &segment->other_tags)) {
|
||||
goto error;
|
||||
}
|
||||
GST_WARNING
|
||||
("Unknown local tag 0x%04x of size %d in index table segment", tag,
|
||||
tag_size);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1301,9 +1296,6 @@ mxf_index_table_segment_reset (MXFIndexTableSegment * segment)
|
|||
g_free (segment->index_entries);
|
||||
g_free (segment->delta_entries);
|
||||
|
||||
if (segment->other_tags)
|
||||
g_hash_table_destroy (segment->other_tags);
|
||||
|
||||
memset (segment, 0, sizeof (MXFIndexTableSegment));
|
||||
}
|
||||
|
||||
|
|
|
@ -170,7 +170,8 @@ typedef struct {
|
|||
guint32 n_index_entries;
|
||||
MXFIndexEntry *index_entries;
|
||||
|
||||
GHashTable *other_tags;
|
||||
/* FIXME: The stream_offset is only used by mxfdemux
|
||||
* and not part of the standard, and used wrong */
|
||||
guint64 stream_offset;
|
||||
} MXFIndexTableSegment;
|
||||
|
||||
|
@ -254,7 +255,7 @@ GstBuffer * mxf_primer_pack_to_buffer (const MXFPrimerPack *pack);
|
|||
gboolean mxf_random_index_pack_parse (const MXFUL *ul, const guint8 *data, guint size, GArray **array);
|
||||
GstBuffer * mxf_random_index_pack_to_buffer (const GArray *array);
|
||||
|
||||
gboolean mxf_index_table_segment_parse (const MXFUL *ul, MXFIndexTableSegment *segment, const MXFPrimerPack *primer, const guint8 *data, guint size);
|
||||
gboolean mxf_index_table_segment_parse (const MXFUL *ul, MXFIndexTableSegment *segment, const guint8 *data, guint size);
|
||||
void mxf_index_table_segment_reset (MXFIndexTableSegment *segment);
|
||||
|
||||
gboolean mxf_local_tag_parse (const guint8 * data, guint size, guint16 * tag,
|
||||
|
|
Loading…
Reference in a new issue