Changeset 6675c2badad10a96f95a6d64dc8296ec4441f267

Show
Ignore:
Timestamp:
02/04/08 21:41:50 (6 months ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1207165310 +0200
git-parent:

[885b6b8a436d9948d27c9bbf7b8e2018c283141d]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1207165310 +0200
Message:

Fix snapshot with default video size. Please *test* your changes before commiting.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/video_output/vout_intf.c

    r78e39f0 r6675c2b  
    721721    fmt_out.i_height = var_GetInteger( p_vout, "snapshot-height" ); 
    722722 
     723    fmt_in = p_vout->fmt_in; 
     724 
    723725    if( fmt_out.i_width == 0 && fmt_out.i_height > 0 ) 
    724726    { 
    725         float f = (float)p_vout->fmt_in.i_height / fmt_out.i_height; 
    726         fmt_out.i_width = p_vout->fmt_in.i_width / f; 
     727        float f = (float)fmt_in.i_height / fmt_out.i_height; 
     728        fmt_out.i_width = fmt_in.i_width / f; 
    727729    } 
    728730    else if( fmt_out.i_height == 0 && fmt_out.i_width > 0 ) 
    729731    { 
    730         float f = (float)p_vout->fmt_in.i_width / fmt_out.i_width; 
    731         fmt_out.i_height = p_vout->fmt_in.i_height / f; 
     732        float f = (float)fmt_in.i_width / fmt_out.i_width; 
     733        fmt_out.i_height = fmt_in.i_height / f; 
     734    } 
     735    else 
     736    { 
     737        fmt_out.i_width = fmt_in.i_width; 
     738        fmt_out.i_height = fmt_in.i_height; 
    732739    } 
    733740 
    734741    /* Save the snapshot */ 
    735     fmt_in = p_vout->fmt_in; 
    736742    fmt_out.i_sar_num = fmt_out.i_sar_den = 1; 
    737743    i_ret = image_WriteUrl( p_image, p_pic, &fmt_in, &fmt_out, psz_filename );