diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-08-08 22:14:53 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-08-08 22:14:53 +0200 |
commit | 6115e0cb0ef3ae85397297c7e30c2e9b4a0a181e (patch) | |
tree | 89d71479053cc6ca7a0f0564c554840cbf7336be /gst | |
parent | 531ce4228d20af61f120ceceef28e9d6d29c49e1 (diff) | |
download | gst-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')
-rw-r--r-- | 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 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 */ |