diff --git a/ChangeLog b/ChangeLog index 5bd80463c1..457d64ab9d 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 297ae13633..4fdb9acf04 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: