summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Arne Petersen <jpetersen@jpetersen.org>2007-06-05 13:58:30 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-06-05 13:58:30 +0000
commitddbf1ee10cd353a5ad403d46f64bb8c155fcd85d (patch)
treebca0565b374d870c24d9c7130358d871590059f1
parent991730660c8b69daadbdca8cf1009a16b0bccc37 (diff)
ext/ffmpeg/gstffmpegdemux.c: Use total duration when the individual stream duration is not known.
Original commit message from CVS: Patch by: Jan Arne Petersen <jpetersen at jpetersen dot org> * ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_src_query): Use total duration when the individual stream duration is not known. Fixes #375534.
-rw-r--r--ChangeLog8
-rw-r--r--ext/ffmpeg/gstffmpegdemux.c8
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5bd8046..457d64a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2007-06-05 Wim Taymans <wim@fluendo.com>
+ Patch by: Jan Arne Petersen <jpetersen at jpetersen dot org>
+
+ * ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_src_query):
+ Use total duration when the individual stream duration is not known.
+ Fixes #375534.
+
+2007-06-05 Wim Taymans <wim@fluendo.com>
+
Patch by: Laurent Glayal <spglegle at yahoo dot fr>
* ext/ffmpeg/gstffmpegscale.c: (gst_ffmpegscale_handle_src_event):
diff --git a/ext/ffmpeg/gstffmpegdemux.c b/ext/ffmpeg/gstffmpegdemux.c
index 297ae13..4fdb9ac 100644
--- a/ext/ffmpeg/gstffmpegdemux.c
+++ b/ext/ffmpeg/gstffmpegdemux.c
@@ -704,8 +704,12 @@ gst_ffmpegdemux_src_query (GstPad * pad, GstQuery * query)
timeduration =
gst_ffmpeg_time_ff_to_gst (avstream->duration, avstream->time_base);
- if (!(GST_CLOCK_TIME_IS_VALID (timeduration)))
- break;
+ if (!(GST_CLOCK_TIME_IS_VALID (timeduration))) {
+ /* use duration of complete file if the stream duration is not known */
+ timeduration = demux->duration;
+ if (!(GST_CLOCK_TIME_IS_VALID (timeduration)))
+ break;
+ }
switch (format) {
case GST_FORMAT_TIME: