Changeset 09b70e1c19e9ffce31146c4853cf705591e30adc

Show
Ignore:
Timestamp:
06/11/06 22:52:08 (2 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1150059128 +0000
git-parent:

[b7ce1c36e2c9fbfa4c452af991eb3aa8506755fe]

git-author:
Gildas Bazin <gbazin@videolan.org> 1150059128 +0000
Message:

* modules/packetizer/mpeg4video.c: ts/ps muxers rely on VOL being present in the stream.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/packetizer/mpeg4video.c

    ra1bf965 r09b70e1  
    337337    if( p_frag->p_buffer[3] == 0xB0 || p_frag->p_buffer[3] == 0xB1 ) 
    338338    { 
     339#if 0 
    339340        /* Remove VOS start/end code from the original stream */ 
    340341        block_Release( p_frag ); 
     342#else 
     343        /* Append the block for now since ts/ps muxers rely on VOL 
     344         * being present in the stream */ 
     345        block_ChainLastAppend( &p_sys->pp_last, p_frag ); 
     346#endif 
    341347        return NULL; 
    342348    } 
     
    344350    { 
    345351        /* Copy the complete VOL */ 
    346         p_dec->fmt_out.i_extra = p_frag->i_buffer; 
    347         p_dec->fmt_out.p_extra = 
    348             realloc( p_dec->fmt_out.p_extra, p_dec->fmt_out.i_extra ); 
     352        if( p_dec->fmt_out.i_extra != p_frag->i_buffer ) 
     353        { 
     354            p_dec->fmt_out.p_extra = 
     355                realloc( p_dec->fmt_out.p_extra, p_frag->i_buffer ); 
     356            p_dec->fmt_out.i_extra = p_frag->i_buffer; 
     357        } 
    349358        memcpy( p_dec->fmt_out.p_extra, p_frag->p_buffer, p_frag->i_buffer ); 
    350359        ParseVOL( p_dec, &p_dec->fmt_out, 
    351360                  p_dec->fmt_out.p_extra, p_dec->fmt_out.i_extra ); 
    352361 
     362#if 0 
    353363        /* Remove from the original stream */ 
    354364        block_Release( p_frag ); 
     365#else 
     366        /* Append the block for now since ts/ps muxers rely on VOL 
     367         * being present in the stream */ 
     368        block_ChainLastAppend( &p_sys->pp_last, p_frag ); 
     369#endif 
    355370        return NULL; 
    356371    }