diff mplayer.c @ 31762:da0bfd02286c

Support for image highlights for dvdnav menus. Does not work 100% reliably and needs -sid 0.
author reimar
date Mon, 26 Jul 2010 19:41:04 +0000
parents 121fed0ab46a
children 55dacfca4a43
line wrap: on
line diff
--- a/mplayer.c	Mon Jul 26 17:15:56 2010 +0000
+++ b/mplayer.c	Mon Jul 26 19:41:04 2010 +0000
@@ -3920,8 +3920,14 @@
  if (mpctx->stream->type == STREAMTYPE_DVDNAV) {
    nav_highlight_t hl;
    mp_dvdnav_get_highlight (mpctx->stream, &hl);
+   if (!vo_spudec || !spudec_apply_palette_crop(vo_spudec, hl.palette, hl.sx, hl.sy, hl.ex, hl.ey)) {
    osd_set_nav_box (hl.sx, hl.sy, hl.ex, hl.ey);
    vo_osd_changed (OSDTYPE_DVDNAV);
+   } else {
+     osd_set_nav_box(0, 0, 0, 0);
+     vo_osd_changed(OSDTYPE_DVDNAV);
+     vo_osd_changed(OSDTYPE_SPU);
+   }
 
    if (mp_dvdnav_stream_has_changed(mpctx->stream)) {
      double ar = -1.0;