Changeset 03c6c686591cdaa3438648bf9afaf49d3fdf1107

Show
Ignore:
Timestamp:
17/08/06 22:07:13 (2 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1155845233 +0000
git-parent:

[d42739f82f5dad1f17a6c395d3f09c3334eb4b7f]

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

* modules/stream_out/transcode.c: couple of small fixes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/stream_out/transcode.c

    r416c065 r03c6c68  
    515515    if( p_sys->i_acodec ) 
    516516    { 
    517         if( (strncmp( (char *)&p_sys->i_acodec, "mp3", 3) == 0) && 
    518                             (p_sys->i_channels > 2)
     517        if( p_sys->i_acodec == VLC_FOURCC('m','p','3',0) && 
     518            p_sys->i_channels > 2
    519519        { 
    520520            msg_Warn( p_stream, "%d channels invalid for mp3, forcing to 2", 
     
    663663 
    664664    var_Get( p_stream, SOUT_CFG_PREFIX "canvas-aspect", &val ); 
    665     if ( val.psz_string ) 
     665    p_sys->i_canvas_aspect = 0; 
     666    if( val.psz_string && *val.psz_string ) 
    666667    { 
    667668        char *psz_parser = strchr( val.psz_string, ':' ); 
    668  
    669669        if( psz_parser ) 
    670670        { 
    671671            *psz_parser++ = '\0'; 
    672             p_sys->i_canvas_aspect = atoi( val.psz_string ) * VOUT_ASPECT_FACTOR 
    673                 / atoi( psz_parser ); 
    674         } 
    675         else 
    676         { 
    677             msg_Warn( p_stream, "bad aspect ratio %s", val.psz_string ); 
    678             p_sys->i_canvas_aspect = 0; 
    679         } 
    680  
    681         free( val.psz_string ); 
    682     } 
    683     else 
    684     { 
    685         p_sys->i_canvas_aspect = 0; 
    686     } 
     672            p_sys->i_canvas_aspect = atoi( val.psz_string ) * 
     673                VOUT_ASPECT_FACTOR / atoi( psz_parser ); 
     674        } 
     675        else msg_Warn( p_stream, "bad aspect ratio %s", val.psz_string ); 
     676 
     677    } 
     678    if( val.psz_string ) free( val.psz_string ); 
    687679 
    688680    var_Get( p_stream, SOUT_CFG_PREFIX "threads", &val );