Changeset 916eeea248d2ee6d1ac7fb559d2f71a15772c1cd

Show
Ignore:
Timestamp:
01/06/05 12:59:51 (3 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1117623591 +0000
git-parent:

[2f61ca436769f03d5c666144e4e73b4935840373]

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

* modules/packetizer/mpeg4video.c: remove the VOL from the packetized stream and put it in fmt.p_extra instead.

Files:

Legend:

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

    r4bac829 r916eeea  
    236236        if( p_vol ) 
    237237        { 
    238             /* Copy the complete VOL */ 
    239             p_dec->fmt_out.i_extra = p_start - p_vol; 
    240             p_dec->fmt_out.p_extra = 
    241                 realloc( p_dec->fmt_out.p_extra, p_dec->fmt_out.i_extra ); 
    242             memcpy( p_dec->fmt_out.p_extra, p_vol, p_dec->fmt_out.i_extra ); 
    243             m4v_VOLParse( p_dec, &p_dec->fmt_out, 
    244                           p_dec->fmt_out.p_extra, p_dec->fmt_out.i_extra ); 
     238            if( !p_dec->fmt_out.i_extra ) 
     239            { 
     240                /* Copy the complete VOL */ 
     241                p_dec->fmt_out.i_extra = p_start - p_vol; 
     242                p_dec->fmt_out.p_extra = 
     243                    realloc( p_dec->fmt_out.p_extra, p_dec->fmt_out.i_extra ); 
     244                memcpy( p_dec->fmt_out.p_extra, p_vol, 
     245                        p_dec->fmt_out.i_extra ); 
     246                m4v_VOLParse( p_dec, &p_dec->fmt_out, 
     247                              p_dec->fmt_out.p_extra, p_dec->fmt_out.i_extra ); 
     248            } 
     249 
     250            /* Remove VOL from the original stream */ 
     251            memmove( p_vol, p_start, 
     252                     p_sys->i_buffer - (p_start - p_sys->p_buffer) ); 
     253            p_sys->i_buffer -= p_dec->fmt_out.i_extra; 
     254            p_start = p_vol; 
    245255 
    246256            p_vol = NULL;