summaryrefslogtreecommitdiffstats
path: root/gst/matroska
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-07-02 08:57:04 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-07-02 08:57:04 +0000
commit35bcb8d8b0bb62bd4e575b049437a0cd351028f9 (patch)
tree22a48075c24cc8d54fbafbc9cbc2029191f29148 /gst/matroska
parent5b68f28c944e7be23b88ba04f7c44c58899dc53d (diff)
gst/matroska/matroska-demux.*: Don't set the segment duration to the duration from the Matroska header as this value ...
Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_reset), (gst_matroska_demux_handle_src_query), (gst_matroska_demux_parse_info), (gst_matroska_demux_loop_stream_parse_id): * gst/matroska/matroska-demux.h: Don't set the segment duration to the duration from the Matroska header as this value could be wrong and is just informational.
Diffstat (limited to 'gst/matroska')
-rw-r--r--gst/matroska/matroska-demux.c6
-rw-r--r--gst/matroska/matroska-demux.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 037ff30e..a9dbed55 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -331,6 +331,7 @@ gst_matroska_demux_reset (GstElement * element)
demux->tags_parsed = NULL;
gst_segment_init (&demux->segment, GST_FORMAT_TIME);
+ demux->duration = -1;
}
static gint
@@ -1537,7 +1538,7 @@ gst_matroska_demux_handle_src_query (GstPad * pad, GstQuery * query)
}
GST_OBJECT_LOCK (demux);
- gst_query_set_duration (query, GST_FORMAT_TIME, demux->segment.duration);
+ gst_query_set_duration (query, GST_FORMAT_TIME, demux->duration);
GST_OBJECT_UNLOCK (demux);
res = TRUE;
@@ -2331,7 +2332,7 @@ gst_matroska_demux_parse_info (GstMatroskaDemux * demux)
dur = gst_gdouble_to_guint64 (num *
gst_guint64_to_gdouble (demux->time_scale));
if (GST_CLOCK_TIME_IS_VALID (dur) && dur <= G_MAXINT64)
- demux->segment.duration = dur;
+ demux->duration = dur;
break;
}
@@ -4511,7 +4512,6 @@ gst_matroska_demux_loop_stream_parse_id (GstMatroskaDemux * demux,
break;
demux->state = GST_MATROSKA_DEMUX_STATE_DATA;
- /* FIXME: different streams might have different lengths! */
/* send initial discont */
gst_matroska_demux_send_event (demux,
gst_event_new_new_segment (FALSE, 1.0,
diff --git a/gst/matroska/matroska-demux.h b/gst/matroska/matroska-demux.h
index c510e498..8b45f556 100644
--- a/gst/matroska/matroska-demux.h
+++ b/gst/matroska/matroska-demux.h
@@ -96,6 +96,7 @@ typedef struct _GstMatroskaDemux {
/* keeping track of playback position */
GstSegment segment;
gboolean segment_running;
+ gint64 duration;
} GstMatroskaDemux;
typedef struct _GstMatroskaDemuxClass {