Show
Ignore:
Timestamp:
03/11/09 16:12:46 (4 years ago)
Author:
robert
Message:

From Tanguy Fautre,

Clean up of the FFmpeg plugin's class API/AudioStream API.
Implementation of isImageTransparent().
Implementation of Image:g/setPixelAspectRatio()

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp

    r9869 r9910  
    223223void FFmpegDecoderVideo::findAspectRatio() 
    224224{ 
    225     double ratio = 0.0; 
     225    float ratio = 0.0f; 
    226226 
    227227    if (m_context->sample_aspect_ratio.num != 0) 
    228         ratio = (av_q2d(m_context->sample_aspect_ratio) * m_width) / m_height; 
    229  
    230     if (ratio <= 0.0) 
    231         ratio = double(m_width) / double(m_height); 
    232  
    233     m_aspect_ratio = ratio; 
     228        ratio = float(av_q2d(m_context->sample_aspect_ratio)); 
     229 
     230    if (ratio <= 0.0f) 
     231        ratio = 1.0f; 
     232 
     233    m_pixel_aspect_ratio = ratio; 
    234234} 
    235235