From 6115e0cb0ef3ae85397297c7e30c2e9b4a0a181e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 8 Aug 2009 22:14:53 +0200 Subject: mpegtsdemux: Don't answer the SEEKING query if we don't know the answer yet A bitrate!=-1 is required for seeking but the bitrate is only calculated after the second PCR was read. Fixes bug #590446. --- gst/mpegdemux/gstmpegtsdemux.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index 5a9a41de..0a6f28a5 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -2795,6 +2795,13 @@ gst_mpegts_demux_src_pad_query (GstPad * pad, GstQuery * query) goto beach; } + /* We can't say anything about seekability if we didn't + * have a second PCR yet because the bitrate is calculated + * from this + */ + if (demux->bitrate == -1 && demux->pcr[1] == -1) + goto beach; + /* We can seek if upstream supports BYTES seeks and we * have a bitrate */ -- cgit v1.2.1