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.
This commit is contained in:
Jan Arne Petersen 2007-06-05 13:58:30 +00:00 committed by Wim Taymans
parent 991730660c
commit ddbf1ee10c
2 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,11 @@
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>

View file

@ -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: