Changeset 101d58fdc449a6ed7b1924b9c83881f762263a30

Show
Ignore:
Timestamp:
19/01/08 20:58:45 (9 months ago)
Author:
Pavlov Konstantin <thresh@videolan.org>
git-committer:
Pavlov Konstantin <thresh@videolan.org> 1200772725 +0000
git-parent:

[42ca90b53c010df7346bab61975e52de30184223]

git-author:
Pavlov Konstantin <thresh@videolan.org> 1200772725 +0000
Message:

Move appropriate code to DEMUX_GET_LENGTH and destroy saved args when done.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/mpeg/mpga.c

    r99180b0 r101d58f  
    339339 
    340340    va_copy ( args_save, args ); 
    341     va_end ( args_save ); 
    342341 
    343342    switch( i_query ) 
     
    357356             * needed for multi-input */ 
    358357 
    359         default
     358        case DEMUX_GET_LENGTH
    360359            i_ret = demux2_vaControlHelper( p_demux->s, 0, -1, 
    361360                                            p_sys->i_bitrate_avg, 1, i_query, 
     
    363362            /* No bitrate, we can't have it precisely, but we can compute 
    364363             * a raw approximation with time/position */ 
    365             if( i_ret && i_query == DEMUX_GET_LENGTH &&!p_sys->i_bitrate_avg ) 
     364            if( i_ret && !p_sys->i_bitrate_avg ) 
    366365            { 
    367366                float f_pos = (double)(uint64_t)( stream_Tell( p_demux->s ) ) / 
     
    377376                return VLC_SUCCESS; 
    378377            } 
     378            va_end( args_save ); 
     379            return i_ret; 
     380 
     381        default: 
     382            i_ret = demux2_vaControlHelper( p_demux->s, 0, -1, 
     383                                            p_sys->i_bitrate_avg, 1, i_query, 
     384                                            args ); 
    379385            if( !i_ret && p_sys->i_bitrate_avg > 0 && 
    380386                (i_query == DEMUX_SET_POSITION || i_query == DEMUX_SET_TIME) )