diff mpcommon.c @ 35044:99ac85950277

Support decoding teletext in the format that WTV uses.
author reimar
date Sat, 01 Sep 2012 14:53:05 +0000
parents 02a03e00341e
children 014d0c671b80
line wrap: on
line diff
--- a/mpcommon.c	Sat Sep 01 14:47:50 2012 +0000
+++ b/mpcommon.c	Sat Sep 01 14:53:05 2012 +0000
@@ -276,6 +276,15 @@
             if (type == 'd') {
                 if (d_dvdsub->demuxer->teletext) {
                     uint8_t *p = packet;
+                    if (len == 3124) { // wtv subtitle-only format
+                        while (len >= 42) {
+                            teletext_control(d_dvdsub->demuxer->teletext,
+                                TV_VBI_CONTROL_DECODE_LINE, p);
+                            p   += 42;
+                            len -= 42;
+                        }
+                        return;
+                    }
                     p++;
                     len--;
                     while (len >= 46) {