summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorxylosper <darklin20@gmail.com>2014-03-25 22:25:29 +0900
committerxylosper <darklin20@gmail.com>2014-03-25 22:25:29 +0900
commitcb7cf1cfb11de590a3e76027fbdbd269edfd8825 (patch)
treec2c2b1a18e6d41e0a3710c0bf430fda2f5215f59 /player
parentd2e4938c78014f182e0dce0458cb2a45d2f3c418 (diff)
downloadmpv-cb7cf1cfb11de590a3e76027fbdbd269edfd8825.tar.bz2
mpv-cb7cf1cfb11de590a3e76027fbdbd269edfd8825.tar.xz
dvdnav: prevent reallocation of fake highlight buffer
Since subsizes were never updated, the bitmap buffer was always reallocated whenever mp_nav_get_highlight() called.
Diffstat (limited to 'player')
-rw-r--r--player/dvdnav.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/player/dvdnav.c b/player/dvdnav.c
index 5b40f1256f..20b11af52c 100644
--- a/player/dvdnav.c
+++ b/player/dvdnav.c
@@ -247,6 +247,8 @@ void mp_nav_get_highlight(void *priv, struct mp_osd_res res,
talloc_free(sub->bitmap);
sub->bitmap = talloc_array(sub, uint32_t, sizes[0] * sizes[1]);
memset(sub->bitmap, 0x80, talloc_get_size(sub->bitmap));
+ nav->subsize[0] = sizes[0];
+ nav->subsize[1] = sizes[1];
}
sub->x = nav->highlight[0];