$OpenBSD: patch-mpeg2_video_spu_mixer_c,v 1.3 2003/02/24 22:56:35 espie Exp $
--- mpeg2_video/spu_mixer.c.orig	Mon Feb 17 16:17:55 2003
+++ mpeg2_video/spu_mixer.c	Wed Feb 19 17:59:16 2003
@@ -44,6 +44,8 @@
 
 
 
+int subtitle_pos[50];
+int subtitle_index = 0;
 
 #ifdef DEBUG
 #define GETBYTES(a,b) getbytes(a,b)
@@ -934,6 +936,7 @@ static void decode_display_data(spu_hand
   y = 0;
 
   DPRINTF(5, "vlc decoding\n");
+  subtitle_index = spu_info->y_start / 64;
   while((fieldoffset[1] < spu_info->DCSQT_offset) && (y < spu_info->height)) {
     unsigned int vlc;
     unsigned int length;
@@ -999,7 +1002,7 @@ static void decode_display_data(spu_hand
 #define MIN(x,y) (((x) < (y)) ? (x) : (y))
 #endif
     {
-      const unsigned int line_y = (y + spu_info->y_start) * line_stride;
+      const unsigned int line_y = (y + spu_info->y_start+subtitle_pos[subtitle_index]) * line_stride;
       // (width * bpp) == line_stride (for rgb or yuv)
       
       // bpp == 1
