[vlc-devel] commit: Fixed closed caption decoder with CC3/4 and TX data. ( Laurent Aimar )
git version control
git at videolan.org
Mon Mar 1 22:40:45 CET 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Mar 1 21:11:17 2010 +0100| [86d3f7ad940198606f709fe5f13c8e4634f542d7] | committer: Laurent Aimar
Fixed closed caption decoder with CC3/4 and TX data.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=86d3f7ad940198606f709fe5f13c8e4634f542d7
---
modules/codec/cc.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/modules/codec/cc.c b/modules/codec/cc.c
index 3e659cd..0d1ab2e 100644
--- a/modules/codec/cc.c
+++ b/modules/codec/cc.c
@@ -563,6 +563,9 @@ static void Eia608EraseToEndOfRow( eia608_t *h )
static void Eia608RollUp( eia608_t *h )
{
+ if( h->mode == EIA608_MODE_TEXT )
+ return;
+
const int i_screen = Eia608GetWritingScreenIndex( h );
eia608_screen *screen = &h->screen[i_screen];
@@ -616,15 +619,10 @@ static void Eia608ParseChannel( eia608_t *h, const uint8_t d[2] )
/* */
const int d1 = d[0] & 0x7f;
- // const int d2 = d[1] & 0x7f;
- if( d1 == 0x14 )
- h->i_channel = 1;
- else if( d1 == 0x1c )
- h->i_channel = 2;
- else if( d1 == 0x15 )
+ if( d1 >= 0x10 && d1 <= 0x1f )
+ h->i_channel = 1 + ((d1 & 0x08) != 0);
+ else if( d1 < 0x10 )
h->i_channel = 3;
- else if( d1 == 0x1d )
- h->i_channel = 4;
}
static bool Eia608ParseTextAttribute( eia608_t *h, uint8_t d2 )
{
More information about the vlc-devel
mailing list