vlc | branch: master | Francois Cartegnie <[email protected]> | Fri Sep 23 
20:33:13 2016 +0200| [64582d32ec13681f4fe5c36428f3a84fe32daa60] | committer: 
Francois Cartegnie

codec: cc: interpolate only valid caption packets

unsure if that shouldn't be per channel

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

 modules/codec/cc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/codec/cc.c b/modules/codec/cc.c
index 5fd1099..3b61c94 100644
--- a/modules/codec/cc.c
+++ b/modules/codec/cc.c
@@ -469,11 +469,13 @@ static subpicture_t *Convert( decoder_t *p_dec, block_t 
**pp_block )
         /* Mask off the specific i_field bit, else some sequences can be lost. 
*/
         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] );
+            p_sys->i_display_time += CLOCK_FREQ / 30;
+        }
 
         p_block->i_buffer -= 3;
         p_block->p_buffer += 3;
-        p_sys->i_display_time += CLOCK_FREQ / 30;
     }
 
     const mtime_t i_pts = p_sys->i_display_time;

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to