[vlc-commits] packetizer: h264: handle AU_END flag

Francois Cartegnie git at videolan.org
Thu Mar 7 17:29:29 CET 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Aug 28 23:52:11 2018 +0200| [075b3b99afd9cb626e582a549c4e921e30dec79b] | committer: Francois Cartegnie

packetizer: h264: handle AU_END flag

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

 modules/packetizer/h264.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index e705a0a17f..13806a1ba8 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -589,6 +589,8 @@ static block_t *ParseNALBlock( decoder_t *p_dec, bool *pb_ts_used, block_t *p_fr
     const int i_nal_type = p_frag->p_buffer[4]&0x1f;
     const vlc_tick_t i_frag_dts = p_frag->i_dts;
     const vlc_tick_t i_frag_pts = p_frag->i_pts;
+    bool b_au_end = p_frag->i_flags & BLOCK_FLAG_AU_END;
+    p_frag->i_flags &= ~BLOCK_FLAG_AU_END;
 
     if( p_sys->b_slice && (!p_sys->p_active_pps || !p_sys->p_active_sps) )
     {
@@ -741,6 +743,11 @@ static block_t *ParseNALBlock( decoder_t *p_dec, bool *pb_ts_used, block_t *p_fr
             date_Set( &p_sys->dts, i_frag_dts );
     }
 
+    if( p_sys->b_slice && b_au_end && !p_pic )
+    {
+        p_pic = OutputPicture( p_dec );
+    }
+
     if( p_pic && (p_pic->i_flags & BLOCK_FLAG_DROP) )
     {
         block_Release( p_pic );



More information about the vlc-commits mailing list