summaryrefslogtreecommitdiffstats
path: root/gst/mpegdemux/gstmpegtsdemux.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-08-08 22:14:53 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-08-08 22:14:53 +0200
commit6115e0cb0ef3ae85397297c7e30c2e9b4a0a181e (patch)
tree89d71479053cc6ca7a0f0564c554840cbf7336be /gst/mpegdemux/gstmpegtsdemux.c
parent531ce4228d20af61f120ceceef28e9d6d29c49e1 (diff)
downloadgst-plugins-bad-6115e0cb0ef3ae85397297c7e30c2e9b4a0a181e.tar.gz
gst-plugins-bad-6115e0cb0ef3ae85397297c7e30c2e9b4a0a181e.tar.bz2
gst-plugins-bad-6115e0cb0ef3ae85397297c7e30c2e9b4a0a181e.zip
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.
Diffstat (limited to 'gst/mpegdemux/gstmpegtsdemux.c')
-rw-r--r--gst/mpegdemux/gstmpegtsdemux.c7
1 files changed, 7 insertions, 0 deletions
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
*/