From fe42ac102000d4f8f58780b372c1d58ba365afb9 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 9 Jan 2009 22:09:06 +0000 Subject: [PATCH] gst/mpegdemux/gstmpegtsdemux.c: Don't forward duration requests in BYTES, since the returned value doesn't mean anyth... Original commit message from CVS: * gst/mpegdemux/gstmpegtsdemux.c: Don't forward duration requests in BYTES, since the returned value doesn't mean anything. Fixes #566959 --- ChangeLog | 6 ++++++ gst/mpegdemux/gstmpegtsdemux.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index cf7795d224..1aeeb9ff8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-09 David Schleef + + * gst/mpegdemux/gstmpegtsdemux.c: + Don't forward duration requests in BYTES, since the returned + value doesn't mean anything. Fixes #566959 + 2009-01-09 David Schleef * gst/qtmux/gstqtmuxmap.c: Add video/x-qt-part and video/x-m4-part diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index ba32ebd56c..1bb1de395c 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -2445,6 +2445,21 @@ gst_fluts_demux_src_pad_query (GstPad * pad, GstQuery * query) } break; } + case GST_QUERY_DURATION: + { + GstFormat format; + gint64 duration; + + gst_query_parse_duration (query, &format, &duration); + + if (format == GST_FORMAT_BYTES) { + res = FALSE; + } else { + res = gst_pad_query_default (pad, query); + } + + break; + } default: res = gst_pad_query_default (pad, query); }