summaryrefslogtreecommitdiffstats
path: root/gst/mxf
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-01-30 19:33:56 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-01-31 11:02:26 +0100
commitebd8b8dbaf5c5c6e938e0bbe05afe25cccd24e1a (patch)
tree0d921422038984259fc93024b9226011df9706c9 /gst/mxf
parentf638caef57cef9639a807d218bfe8073bd2ba139 (diff)
downloadgst-plugins-bad-ebd8b8dbaf5c5c6e938e0bbe05afe25cccd24e1a.tar.gz
gst-plugins-bad-ebd8b8dbaf5c5c6e938e0bbe05afe25cccd24e1a.tar.bz2
gst-plugins-bad-ebd8b8dbaf5c5c6e938e0bbe05afe25cccd24e1a.zip
Fix duration calculation for essence tracks
Diffstat (limited to 'gst/mxf')
-rw-r--r--gst/mxf/mxfdemux.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c
index c27a4770..8eca074f 100644
--- a/gst/mxf/mxfdemux.c
+++ b/gst/mxf/mxfdemux.c
@@ -2267,9 +2267,11 @@ from_index:
GstMXFDemuxEssenceTrack *t =
&g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
- if (t->position != -1)
+ if (t->position > 0)
t->duration = t->position;
}
+ /* For the searched track this is really our position */
+ etrack->duration = etrack->position;
}
if (G_UNLIKELY (ret != GST_FLOW_OK))
@@ -2328,7 +2330,7 @@ gst_mxf_demux_pull_and_handle_klv_packet (GstMXFDemux * demux)
GstMXFDemuxEssenceTrack *t =
&g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
- if (t->position != -1)
+ if (t->position > 0)
t->duration = t->position;
}