diff options
Diffstat (limited to 'gst')
-rw-r--r-- | gst/mxf/mxfdemux.c | 19 | ||||
-rw-r--r-- | gst/mxf/mxfdemux.h | 3 |
2 files changed, 20 insertions, 2 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index db5b6209..32978dd2 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -725,6 +725,14 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) if (tmp->track_number == track->parent.track_number && tmp->body_sid == edata->body_sid) { + if (tmp->track_id != track->parent.track_id || + !mxf_umid_is_equal (&tmp->source_package_uid, + &package->parent.package_uid)) { + GST_ERROR_OBJECT (demux, "There already exists a different track " + "with this track number and body sid but a different source " + "or source track id -- ignoring"); + continue; + } etrack = tmp; break; } @@ -737,6 +745,8 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) memset (&tmp, 0, sizeof (tmp)); tmp.body_sid = edata->body_sid; tmp.track_number = track->parent.track_number; + tmp.track_id = track->parent.track_id; + memcpy (&tmp.source_package_uid, &package->parent.package_uid, 32); if (!demux->essence_tracks) demux->essence_tracks = @@ -756,6 +766,11 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) goto next; } + if (track->parent.n_descriptor == 0) { + GST_WARNING_OBJECT (demux, "Source track has no descriptors"); + goto next; + } + if (track->parent.sequence->duration > etrack->duration) etrack->duration = track->parent.sequence->duration; @@ -773,7 +788,7 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) gchar *name; GST_WARNING_OBJECT (demux, - "No essence element handler for track found"); + "No essence element handler for track %u found", i); mxf_ul_to_string (&track->parent.descriptor[0]->essence_container, essence_container); @@ -840,7 +855,7 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) &g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i); if (!etrack->source_package || !etrack->source_track || !etrack->caps) { - GST_ERROR_OBJECT (demux, "Failed to update essence track"); + GST_ERROR_OBJECT (demux, "Failed to update essence track %u", i); return GST_FLOW_ERROR; } } diff --git a/gst/mxf/mxfdemux.h b/gst/mxf/mxfdemux.h index 23d63c36..db1b4390 100644 --- a/gst/mxf/mxfdemux.h +++ b/gst/mxf/mxfdemux.h @@ -68,6 +68,9 @@ typedef struct guint32 body_sid; guint32 track_number; + guint32 track_id; + MXFUMID source_package_uid; + gint64 position; gint64 duration; |