diff options
author | wm4 <wm4@nowhere> | 2014-01-14 22:02:52 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-01-14 22:24:07 +0100 |
commit | 5196b03fb28309e0ee316b4440313a562819bd28 (patch) | |
tree | 0876831492f1773fe3691a75e59cd48fcdc5ef98 /stream | |
parent | 9dc9254da25b784fe32ec6bedfc258efe2254ba5 (diff) | |
download | mpv-5196b03fb28309e0ee316b4440313a562819bd28.tar.bz2 mpv-5196b03fb28309e0ee316b4440313a562819bd28.tar.xz |
player: avoid stalling when starting a network stream
Starting a network stream could stall by executing uncacheable stream
control requests (STREAM_CTRL_GET_LANG and STREAM_CTRL_GET_DVD_INFO).
Being uncacheable means the player has to wait until the cache is done
reading the current block of data. These requests can't be cached
because they're too complicated, so the only way to avoid them is
special casing the DVD and Bluray streams (which are the only things
which need these requests), and not doing them in other cases.
(This is kind of inelegant, but so is the rest of the DVD/BD code.)
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream.h | 1 | ||||
-rw-r--r-- | stream/stream_bluray.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/stream/stream.h b/stream/stream.h index e64baf07c6..9361884657 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -35,6 +35,7 @@ enum streamtype { STREAMTYPE_RADIO, STREAMTYPE_DVB, STREAMTYPE_DVD, + STREAMTYPE_BLURAY, STREAMTYPE_PVR, STREAMTYPE_TV, STREAMTYPE_MF, diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c index 56cbee42d1..d7a8d0b0cf 100644 --- a/stream/stream_bluray.c +++ b/stream/stream_bluray.c @@ -390,6 +390,7 @@ err_no_info: b->current_angle = angle; b->current_title = title; + s->type = STREAMTYPE_BLURAY; s->end_pos = title_size; s->sector_size = BLURAY_SECTOR_SIZE; s->flags = MP_STREAM_SEEK; |