[vlc-commits] packetizer: h264: set EOS flag

Francois Cartegnie git at videolan.org
Mon Jun 12 17:09:03 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jun 12 17:00:54 2017 +0200| [bcb8f9046ffb245a9cbe47f039da346eab9287c2] | committer: Francois Cartegnie

packetizer: h264: set EOS flag

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

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

diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index 3d142cf45d..98e4641e17 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -644,6 +644,16 @@ static block_t *ParseNALBlock( decoder_t *p_dec, bool *pb_ts_used, block_t *p_fr
         block_ChainLastAppend( &p_sys->pp_sei_last, p_frag );
         p_frag = NULL;
     }
+    else if( i_nal_type == H264_NAL_END_OF_SEQ || i_nal_type == H264_NAL_END_OF_STREAM )
+    {
+        /* Early end of packetization */
+        block_ChainLastAppend( &p_sys->pp_sei_last, p_frag );
+        p_frag = NULL;
+        /* important for still pictures/menus */
+        p_sys->i_next_block_flags |= BLOCK_FLAG_END_OF_SEQUENCE;
+        if( p_sys->b_slice )
+            p_pic = OutputPicture( p_dec );
+    }
     else if( i_nal_type == H264_NAL_AU_DELIMITER ||
              ( i_nal_type >= H264_NAL_PREFIX && i_nal_type <= H264_NAL_RESERVED_18 ) )
     {



More information about the vlc-commits mailing list