diff options
author | xylosper <darklin20@gmail.com> | 2014-03-25 22:25:29 +0900 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-03-30 17:52:43 +0200 |
commit | 8d5775a8d2ae7e5ebf031da8b6ab51ec2e7ff3fb (patch) | |
tree | 3f5b690dee4ff30adc973215bbac55e012822ee4 | |
parent | cf8ff2fd87b5dcf7310eb552f251e6d901c6230e (diff) | |
download | mpv-8d5775a8d2ae7e5ebf031da8b6ab51ec2e7ff3fb.tar.bz2 mpv-8d5775a8d2ae7e5ebf031da8b6ab51ec2e7ff3fb.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.
-rw-r--r-- | player/dvdnav.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/player/dvdnav.c b/player/dvdnav.c index 7e28c1922b..6c5fed2ed6 100644 --- a/player/dvdnav.c +++ b/player/dvdnav.c @@ -237,6 +237,8 @@ void mp_nav_get_highlight(struct osd_state *osd, 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]; |