]> git.sesse.net Git - vlc/blobdiff - modules/codec/schroedinger.c
Workaround deficiency in schroedinger state machine logic
[vlc] / modules / codec / schroedinger.c
index 2c4a2c3ed545e36e985196787ecdf523245db707..3fc1582b8a901c15a6f76bf71b2fc7012ee9c442 100644 (file)
@@ -435,6 +435,10 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
             size_t i_pulen = GetDWBE( p_block->p_buffer + i_bufused + 5 );
             uint8_t *p_pu = p_block->p_buffer + i_bufused;
 
+            if( 0 == i_pulen ) {
+                i_pulen = 13;
+            }
+
             /* blocks that do not start with the parse info prefix are invalid */
             if( p_pu[0] != 'B' || p_pu[1] != 'B' ||
                 p_pu[2] != 'C' || p_pu[3] != 'D')
@@ -484,6 +488,11 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
 #endif
                 SetVideoFormat( p_dec );
                 ResetPTStlb( p_dec );
+
+                p_schroframe = CreateSchroFrameFromPic( p_dec );
+                if( p_schroframe ) {
+                    schro_decoder_add_output_picture( p_sys->p_schro, p_schroframe);
+                }
             }
 
             if( b_bail )