]> git.sesse.net Git - vlc/commitdiff
* src/input/decoder.c: check for codec extra data changes when a packetizer is insert...
authorGildas Bazin <gbazin@videolan.org>
Wed, 1 Jun 2005 10:55:11 +0000 (10:55 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 1 Jun 2005 10:55:11 +0000 (10:55 +0000)
src/input/decoder.c

index 0d944f7833d3d56ad90077c6c81b5b292461471c..7effdb1ac107a48fd79862f42dd356b0f4855902 100644 (file)
@@ -668,6 +668,15 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
             while( (p_packetized_block =
                     p_packetizer->pf_packetize( p_packetizer, &p_block )) )
             {
+                if( p_packetizer->fmt_out.i_extra && !p_dec->fmt_in.i_extra )
+                {
+                    p_dec->fmt_in.i_extra = p_packetizer->fmt_out.i_extra;
+                    p_dec->fmt_in.p_extra = malloc( p_dec->fmt_in.i_extra );
+                    memcpy( p_dec->fmt_in.p_extra,
+                            p_packetizer->fmt_out.p_extra,
+                            p_dec->fmt_in.i_extra );
+                }
+
                 while( p_packetized_block )
                 {
                     block_t *p_next = p_packetized_block->p_next;