Show
Ignore:
Timestamp:
05/08/09 09:46:46 (4 years ago)
Author:
robert
Message:

From Jean-Sebastien Guay, changed the timing control for when no audio layer is supplied.

Files:
1 modified

Legend:

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

    r10088 r10161  
    191191                const double frame_delay = m_clocks.videoRefreshSchedule(synched_pts); 
    192192 
    193                 publishFrame(frame_delay); 
     193                publishFrame(frame_delay, m_clocks.audioDisabled()); 
    194194            } 
    195195        } 
     
    269269 
    270270 
    271 void FFmpegDecoderVideo::publishFrame(const double delay) 
     271void FFmpegDecoderVideo::publishFrame(const double delay, bool audio_disabled) 
    272272{ 
    273273    // If no publishing function, just ignore the frame 
     
    275275        return; 
    276276 
     277#if 1 
     278    // new code from Jean-Sebasiten Guay - needs testing as we're unclear on the best solution 
     279    // If the display delay is too small, we better skip the frame. 
     280    if (!audio_disabled && delay < -0.010) 
     281        return; 
     282#else 
     283    // original solution that hung on video stream over web. 
    277284    // If the display delay is too small, we better skip the frame. 
    278285    if (delay < -0.010) 
    279286        return; 
    280          
     287#endif 
     288 
    281289    AVPicture * const src = (AVPicture *) m_frame.get(); 
    282290    AVPicture * const dst = (AVPicture *) m_frame_rgba.get();