[vlc-commits] codec: cc: match field against the 2 bits

Francois Cartegnie git at videolan.org
Fri Sep 23 15:50:06 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Sep 23 15:43:18 2016 +0200| [8cb57e900b29c1f2adb37587389fdd88969765c0] | committer: Francois Cartegnie

codec: cc: match field against the 2 bits

EIA708 packets will break decoding. Strip them.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8cb57e900b29c1f2adb37587389fdd88969765c0
---

 modules/codec/cc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/cc.c b/modules/codec/cc.c
index 86bbf0a..5fd1099 100644
--- a/modules/codec/cc.c
+++ b/modules/codec/cc.c
@@ -467,7 +467,7 @@ static subpicture_t *Convert( decoder_t *p_dec, block_t **pp_block )
     while( p_block->i_buffer >= 3 && !(i_status & EIA608_STATUS_DISPLAY) )
     {
         /* Mask off the specific i_field bit, else some sequences can be lost. */
-        if ( (p_block->p_buffer[0] & 0x01) == p_sys->i_field &&
+        if ( (p_block->p_buffer[0] & 0x03) == p_sys->i_field &&
              (p_block->p_buffer[0] & 0x04) /* Valid bit */ )
             i_status = Eia608Parse( &p_sys->eia608, p_sys->i_channel, &p_block->p_buffer[1] );
 



More information about the vlc-commits mailing list