vlc | branch: master | Steven Toth <st...@kernellabs.com> | Thu Mar 17 08:29:22 2016 -0400| [f32069ff37c64fef50f8d484f929455792385f5f] | committer: Francois Cartegnie
codec: cc: don't discard good byte sequences p_buffer[0] doesn't always contain just the field 0 or 1. It often contains two other bitmask fields. Ensure we complare the field value only via a bitmask, else we can discard perfectly good CC data. Signed-off-by: Francois Cartegnie <fcvlc...@free.fr> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f32069ff37c64fef50f8d484f929455792385f5f --- modules/codec/cc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/codec/cc.c b/modules/codec/cc.c index 006015e..d5f10b9 100644 --- a/modules/codec/cc.c +++ b/modules/codec/cc.c @@ -466,7 +466,8 @@ static subpicture_t *Convert( decoder_t *p_dec, block_t **pp_block ) /* TODO do the real decoding here */ while( p_block->i_buffer >= 3 && !(i_status & EIA608_STATUS_DISPLAY) ) { - if( p_block->p_buffer[0] == p_sys->i_field ) + /* Mask off the specific i_field bit, else some sequences can be lost. */ + if ( (p_block->p_buffer[0] & 0x01) == p_sys->i_field ) i_status = Eia608Parse( &p_sys->eia608, p_sys->i_channel, &p_block->p_buffer[1] ); p_block->i_buffer -= 3; _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits