]> git.sesse.net Git - vlc/blobdiff - modules/packetizer/mpegvideo.c
Disable focus on buttons to avoid "space" to be catched by a button on focus.
[vlc] / modules / packetizer / mpegvideo.c
index 3ff42ad96a8099e4badb407c1cf6cc32618ad031..4b1545c32b833b5a529a23871dbfe738a4a3ec46 100644 (file)
@@ -445,10 +445,21 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag )
     else if( p_sys->b_frame_slice &&
              (p_frag->p_buffer[3] == 0x00 || p_frag->p_buffer[3] > 0xaf) )
     {
+        const bool b_eos = p_frag->p_buffer[3] == 0xb7;
+
         mtime_t i_duration;
 
+        if( b_eos )
+        {
+            block_ChainLastAppend( &p_sys->pp_last, p_frag );
+            p_frag = NULL;
+        }
+
         p_pic = block_ChainGather( p_sys->p_frame );
 
+        if( b_eos )
+            p_pic->i_flags |= BLOCK_FLAG_END_OF_SEQUENCE;
+
         i_duration = (mtime_t)( 1000000 * p_sys->i_frame_rate_base /
                                 p_sys->i_frame_rate );
 
@@ -563,6 +574,8 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag )
         cc_Flush( &p_sys->cc );
     }
 
+    if( !p_frag )
+        return p_pic;
     /*
      * Check info of current fragment
      */