From: <sl...@ke...> - 2009-08-08 20:16:04
|
Module: gst-plugins-bad Branch: master Commit: 6115e0cb0ef3ae85397297c7e30c2e9b4a0a181e URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=6115e0cb0ef3ae85397297c7e30c2e9b4a0a181e Author: Sebastian Dröge <seb...@co...> Date: Sat Aug 8 22:14:53 2009 +0200 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 files changed, 7 insertions(+), 0 deletions(-) diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index 5a9a41d..0a6f28a 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 */ |