From Julen Garcia, "So here is the code with a proper audio sync (at least in my computer)"

This commit is contained in:
Robert Osfield
2009-12-15 11:27:28 +00:00
parent ce2459a539
commit 9d82266032
5 changed files with 37 additions and 28 deletions

View File

@@ -367,6 +367,7 @@ void FFmpegDecoder::rewindButDontFlushQueues()
if (av_seek_frame(m_format_context.get(), m_video_index, seek_target, 0/*AVSEEK_FLAG_BYTE |*/ /*AVSEEK_FLAG_BACKWARD*/) < 0)
throw std::runtime_error("av_seek_frame failed()");
m_clocks.rewind();
m_state = REWINDING;
}
@@ -392,6 +393,7 @@ void FFmpegDecoder::seekButDontFlushQueues(double time)
if (av_seek_frame(m_format_context.get(), m_video_index, seek_target, 0/*AVSEEK_FLAG_BYTE |*/ /*AVSEEK_FLAG_BACKWARD*/) < 0)
throw std::runtime_error("av_seek_frame failed()");
m_clocks.seek(time);
m_state = SEEKING;
}