[MPlayer-users] Patch for Captioning for ReplayTV 5K Serie DVR mpeg

Wen-King Su wen-king at myri.com
Mon Feb 9 19:56:55 CET 2004


It adds one function to sub_cc.c, and add one conditional statement
to libmpdemux/video.c.  How do I see about getting the patch incorporated?

--- sub_cc.c.orig       2004-02-09 13:35:51.134515920 +0000
+++ sub_cc.c    2004-02-09 13:37:35.134515990 +0000
@@ -291,3 +291,10 @@
        subcc_decode();
 }
 
+void replay_subcc_process_data(unsigned char b1, unsigned char b2)
+{
+       if(!subcc_enabled) return;
+       if(!inited) subcc_init();
+       
+       cc_decode_EIA608(b1 | (b2 << 8));
+}

--- libmpdemux/video.c.orig     2004-02-09 13:35:51.134515920 +0000
+++ libmpdemux/video.c  2004-02-09 13:40:55.134515990 +0000
@@ -295,6 +295,12 @@
 //     mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"video.c: process_userdata() detected Closed Captions!\n");
        if(subcc_enabled) subcc_process_data(buf+2,len-2);
     }
+    if(len == 10 && buf[0] == 0x99 && buf[1] == 0x02 &&
+                   buf[4] == 0xAA && buf[5] == 0x02)
+    {
+       replay_subcc_process_data(buf[2],buf[3]);
+       return;
+    }
     if( len > 2 && buf[ 0 ] == 'T' && buf[ 1 ] == 'Y' )
     {
        ty_processuserdata( buf + 2, len - 2 );





More information about the MPlayer-users mailing list