openbsd-ports/x11/ogle/patches/patch-mpeg2_video_spu_mixer_c

30 lines
974 B
Plaintext
Raw Normal View History

$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 @@
2002-01-08 06:05:53 -05:00
+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
2002-01-08 06:05:53 -05:00
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;
2002-01-08 06:05:53 -05:00
// (width * bpp) == line_stride (for rgb or yuv)
// bpp == 1