From ddbf1ee10cd353a5ad403d46f64bb8c155fcd85d Mon Sep 17 00:00:00 2001 From: Jan Arne Petersen Date: Tue, 5 Jun 2007 13:58:30 +0000 Subject: 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 * ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_src_query): Use total duration when the individual stream duration is not known. Fixes #375534. --- ChangeLog | 8 ++++++++ ext/ffmpeg/gstffmpegdemux.c | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5bd8046..457d64a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-06-05 Wim Taymans + + Patch by: Jan Arne Petersen + + * 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 Patch by: Laurent Glayal 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: -- cgit v1.2.3