Changeset 453ff82acfa8ec4fb717fe71b094199d8659a1f5

Show
Ignore:
Timestamp:
05/17/08 19:42:15 (4 months ago)
Author:
Jean-Paul Saman <jpsaman@videolan.org>
git-committer:
Jean-Paul Saman <jpsaman@videolan.org> 1211046135 +0200
git-parent:

[a26336888230e81aca0f517c0a26a62851c5d4ab]

git-author:
Jean-Paul Saman <jpsaman@videolan.org> 1211016899 +0200
Message:

Remove "out of memory" message

Files:

Legend:

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

    r27d483e r453ff82  
    175175    if( ( p_dec->p_sys = p_sys = malloc( sizeof(decoder_sys_t) ) ) == NULL ) 
    176176    { 
    177         msg_Err( p_dec, "out of memory" ); 
    178         return VLC_EGENERIC; 
     177        return VLC_ENOMEM; 
    179178    } 
    180179    p_sys->i_state = STATE_NOSYNC; 
     
    261260 
    262261        /* FIXME: FFMPEG isn't happy at all if you leave this */ 
    263         if( p_dec->fmt_out.i_extra ) free( p_dec->fmt_out.p_extra ); 
    264         p_dec->fmt_out.i_extra = 0; p_dec->fmt_out.p_extra = NULL; 
     262        if( p_dec->fmt_out.i_extra > 0 ) free( p_dec->fmt_out.p_extra ); 
     263        p_dec->fmt_out.i_extra = 0; 
     264        p_dec->fmt_out.p_extra = NULL; 
    265265 
    266266        /* Set the new extradata */ 
    267267        p_dec->fmt_out.i_extra = p_sys->p_pps->i_buffer + p_sys->p_sps->i_buffer; 
    268         p_dec->fmt_out.p_extra = (uint8_t*)malloc( p_dec->fmt_out.i_extra ); 
     268        p_dec->fmt_out.p_extra = malloc( p_dec->fmt_out.i_extra ); 
    269269        if( p_dec->fmt_out.p_extra ) 
    270270        { 
    271             memcpy( (uint8_t*)p_dec->fmt_out.p_extra, p_sys->p_sps->p_buffer, p_sys->p_sps->i_buffer); 
    272             memcpy( (uint8_t*)p_dec->fmt_out.p_extra+p_sys->p_sps->i_buffer, p_sys->p_pps->p_buffer, p_sys->p_pps->i_buffer); 
     271            memcpy( (uint8_t*)p_dec->fmt_out.p_extra, 
     272                    p_sys->p_sps->p_buffer, p_sys->p_sps->i_buffer); 
     273            memcpy( (uint8_t*)p_dec->fmt_out.p_extra+p_sys->p_sps->i_buffer, 
     274                    p_sys->p_pps->p_buffer, p_sys->p_pps->i_buffer); 
    273275            p_sys->b_header = true; 
    274276        }