[vlc-commits] packetizer: mpegvideo: simplify cc flags handling

Francois Cartegnie git at videolan.org
Tue Aug 1 19:41:02 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Aug  1 15:56:18 2017 +0200| [83a32906c1f6181005e03c0201652afdafb6d275] | committer: Francois Cartegnie

packetizer: mpegvideo: simplify cc flags handling

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

 modules/packetizer/mpegvideo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/packetizer/mpegvideo.c b/modules/packetizer/mpegvideo.c
index a2f90b9183..de2968dbcf 100644
--- a/modules/packetizer/mpegvideo.c
+++ b/modules/packetizer/mpegvideo.c
@@ -301,7 +301,7 @@ static block_t *GetCc( decoder_t *p_dec, bool pb_present[4], int *pi_reorder_dep
         memcpy( p_cc->p_buffer, p_sys->cc.p_data, p_sys->cc.i_data );
         p_cc->i_dts = 
         p_cc->i_pts = p_sys->cc.b_reorder ? p_sys->i_cc_pts : p_sys->i_cc_dts;
-        p_cc->i_flags = ( p_sys->cc.b_reorder ? p_sys->i_cc_flags : BLOCK_FLAG_TYPE_P ) & ( BLOCK_FLAG_TYPE_I|BLOCK_FLAG_TYPE_P|BLOCK_FLAG_TYPE_B);
+        p_cc->i_flags = p_sys->cc.b_reorder ? p_sys->i_cc_flags : BLOCK_FLAG_TYPE_P;
     }
     cc_Flush( &p_sys->cc );
     return p_cc;
@@ -611,7 +611,7 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag )
         p_sys->b_cc_reset = true;
         p_sys->i_cc_pts = p_pic->i_pts;
         p_sys->i_cc_dts = p_pic->i_dts;
-        p_sys->i_cc_flags = p_pic->i_flags;
+        p_sys->i_cc_flags = p_pic->i_flags & BLOCK_FLAG_TYPE_MASK;
     }
 
     if( !p_pic && p_sys->b_cc_reset )



More information about the vlc-commits mailing list