Changeset b1e8912f30d256bf83bce9d3c8a8c5f0d5d8625c

Show
Ignore:
Timestamp:
03/01/04 23:35:55 (5 years ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1078180555 +0000
git-parent:

[ab3260f055c911276a5bfc76ad2d1ca01fda235e]

git-author:
Laurent Aimar <fenrir@videolan.org> 1078180555 +0000
Message:
  • video.c: make SVQ3/ffmpeg happy with complex stsd atom (ie with more
    than just the "SMI " one).
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/codec/ffmpeg/video.c

    rde81c25 rb1e8912  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999-2001 VideoLAN 
    5  * $Id: video.c,v 1.67 2004/02/25 17:48:52 fenrir Exp $ 
     5 * $Id: video.c,v 1.68 2004/03/01 22:35:55 fenrir Exp $ 
    66 * 
    77 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
     
    294294            memset( &p[4], 0, 8 ); 
    295295            memcpy( &p[12], p_dec->fmt_in.p_extra, i_size ); 
     296 
     297            /* Now remove all atoms before the SMI one */ 
     298            if( p_sys->p_context->extradata_size > 0x5a && strncmp( &p[0x56], "SMI ", 4 ) ) 
     299            { 
     300                uint8_t *psz = &p[0x52]; 
     301 
     302                while( psz < &p[p_sys->p_context->extradata_size - 8] ) 
     303                { 
     304                    int i_size = GetDWBE( psz ); 
     305                    if( i_size <= 1 ) 
     306                    { 
     307                        /* FIXME handle 1 as long size */ 
     308                        break; 
     309                    } 
     310                    if( !strncmp( &psz[4], "SMI ", 4 ) ) 
     311                    { 
     312                        memmove( &p[0x52], psz, &p[p_sys->p_context->extradata_size] - psz ); 
     313                        break; 
     314                    } 
     315 
     316                    psz += i_size; 
     317                } 
     318            } 
    296319        } 
    297320        else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'R', 'V', '1', '0' ) ||