Changeset 21a96468ba1dea744e473d8db48a4ee25a2d4818

Show
Ignore:
Timestamp:
02/07/08 21:57:30 (5 months ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1215028650 +0000
git-parent:

[0bac0634f9a8e0ef9d8e78b2abbcae7e49deb4b6]

git-author:
Laurent Aimar <fenrir@videolan.org> 1215018751 +0000
Message:

Cosmetics (replace defines by pointers)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/asf/libasf.c

    r0bac063 r21a9646  
    624624        for( i_codec = 0; i_codec < p_cl->i_codec_entries_count; i_codec++ ) 
    625625        { 
    626 #define codec p_cl->codec[i_codec] 
     626            asf_codec_entry_t *p_codec = &p_cl->codec[i_codec]; 
    627627            int i_len, i; 
    628628 
    629             codec.i_type = GetWLE( p_data ); p_data += 2; 
     629            p_codec->i_type = GetWLE( p_data ); p_data += 2; 
    630630            /* codec name */ 
    631631            i_len = GetWLE( p_data ); p_data += 2; 
    632             codec.psz_name = calloc( i_len + 1, sizeof(char) ); 
     632            p_codec->psz_name = calloc( i_len + 1, sizeof(char) ); 
    633633            for( i = 0; i < i_len; i++ ) 
    634634            { 
    635                 codec.psz_name[i] = GetWLE( p_data + 2*i ); 
     635                p_codec->psz_name[i] = GetWLE( p_data + 2*i ); 
    636636            } 
    637             codec.psz_name[i_len] = '\0'; 
     637            p_codec->psz_name[i_len] = '\0'; 
    638638            p_data += 2 * i_len; 
    639639 
    640640            /* description */ 
    641641            i_len = GetWLE( p_data ); p_data += 2; 
    642             codec.psz_description = calloc( i_len + 1, sizeof(char) ); 
     642            p_codec->psz_description = calloc( i_len + 1, sizeof(char) ); 
    643643            for( i = 0; i < i_len; i++ ) 
    644644            { 
    645                 codec.psz_description[i] = GetWLE( p_data + 2*i ); 
     645                p_codec->psz_description[i] = GetWLE( p_data + 2*i ); 
    646646            } 
    647             codec.psz_description[i_len] = '\0'; 
     647            p_codec->psz_description[i_len] = '\0'; 
    648648            p_data += 2 * i_len; 
    649649 
    650650            /* opaque information */ 
    651             codec.i_information_length = GetWLE( p_data ); p_data += 2; 
    652             if( codec.i_information_length > 0 ) 
     651            p_codec->i_information_length = GetWLE( p_data ); p_data += 2; 
     652            if( p_codec->i_information_length > 0 ) 
    653653            { 
    654                 codec.p_information = malloc( codec.i_information_length ); 
    655                 memcpy( codec.p_information, p_data, codec.i_information_length ); 
    656                 p_data += codec.i_information_length; 
     654                p_codec->p_information = malloc( p_codec->i_information_length ); 
     655                memcpy( p_codec->p_information, p_data, p_codec->i_information_length ); 
     656                p_data += p_codec->i_information_length; 
    657657            } 
    658658            else 
    659659            { 
    660                 codec.p_information = NULL; 
     660                p_codec->p_information = NULL; 
    661661            } 
    662 #undef  codec 
    663662        } 
    664663    } 
     
    697696    for( i_codec = 0; i_codec < p_cl->i_codec_entries_count; i_codec++ ) 
    698697    { 
    699 #define codec p_cl->codec[i_codec] 
    700         FREENULL( codec.psz_name ); 
    701         FREENULL( codec.psz_description ); 
    702         FREENULL( codec.p_information ); 
    703 #undef  codec 
     698        asf_codec_entry_t *p_codec = &p_cl->codec[i_codec]; 
     699 
     700        FREENULL( p_codec->psz_name ); 
     701        FREENULL( p_codec->psz_description ); 
     702        FREENULL( p_codec->p_information ); 
    704703    } 
    705704    FREENULL( p_cl->codec );