Skip to content

Commit

Permalink
codec: cc: only decode valid captions
Browse files Browse the repository at this point in the history
required to remove cc filtering ahead
  • Loading branch information
fcartegnie committed Sep 23, 2016
1 parent aeb5eea commit 67dd763
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/codec/cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@ 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] & 0x01) == 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] );

p_block->i_buffer -= 3;
Expand Down

0 comments on commit 67dd763

Please sign in to comment.