summaryrefslogtreecommitdiffstats
path: root/libvo/vo_vdpau.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-02 00:25:06 +0200
committerwm4 <wm4@nowhere>2012-10-16 07:26:31 +0200
commit42572fdcc0931f814147974a11bc2c531843d124 (patch)
tree99b5fa253d68f14ff007296649f35ec4a4306d3e /libvo/vo_vdpau.c
parent252ddcc014b7672a4434823fc6275be1b039bd79 (diff)
downloadmpv-42572fdcc0931f814147974a11bc2c531843d124.tar.bz2
mpv-42572fdcc0931f814147974a11bc2c531843d124.tar.xz
sub, vo_gl3, vo_vdpau: exit early if there are no sub-images to draw
libass may always return a full change if no subtitle images are rendered in some cases (empty tracks). Also, a full change despite empty sub-images list may be reported on initialization. Avoid invoking odd special cases in the VO code by always exiting early if the sub-image list is empty. Note that at least for OSD, the code in sub.c doesn't even send a request VOCTRL_DRAW_EOSD if the image list is empty. But the subtitle rendering code in vf_vo.c is independent from this (at least for now).
Diffstat (limited to 'libvo/vo_vdpau.c')
-rw-r--r--libvo/vo_vdpau.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c
index 41feaca7b6..14b9d0df63 100644
--- a/libvo/vo_vdpau.c
+++ b/libvo/vo_vdpau.c
@@ -997,7 +997,7 @@ static void generate_eosd(struct vo *vo, mp_eosd_images_t *imgs)
sfc->render_count = 0;
- if (imgs->format == SUBBITMAP_EMPTY)
+ if (imgs->format == SUBBITMAP_EMPTY || imgs->num_parts == 0)
return;
if (imgs->bitmap_id == sfc->bitmap_id)