Fixed bug on Image processing, with no video or audio present. Play() and DisplayWaveform() methods now handle not having any audio samples.

This commit is contained in:
Jonathan Thomas
2011-10-27 11:27:44 -05:00
parent 28b9fbabd1
commit bfc05d507d
3 changed files with 77 additions and 50 deletions

View File

@@ -760,9 +760,9 @@ Frame FFmpegReader::CreateFrame(int requested_frame)
void FFmpegReader::CheckWorkingFrames(bool end_of_stream)
{
// Adjust for video only, or audio only
if (info.video_stream_index < 0)
if (!info.has_video)
last_video_frame = last_audio_frame;
if (info.audio_stream_index < 0)
if (!info.has_audio)
last_audio_frame = last_video_frame;
// Loop through all working queue frames