Better working LAVC seeking

Originally committed to SVN as r163.
This commit is contained in:
Rodrigo Braz Monteiro 2006-02-25 01:59:33 +00:00
parent 6313d8eafd
commit e8f7defb88
1 changed files with 2 additions and 1 deletions

View File

@ -293,7 +293,8 @@ wxBitmap LAVCVideoProvider::GetFrame(int n) {
__int64 finalPos = av_rescale(seekTo,stream->time_base.den,AV_TIME_BASE * __int64(stream->time_base.num));
// Seek to keyframe
int result = av_seek_frame(formatContext,vidStream,finalPos,0);
//int result = av_seek_frame(formatContext,vidStream,finalPos,0);
int result = av_seek_frame(formatContext,vidStream,finalPos,AVSEEK_FLAG_BACKWARD);
avcodec_flush_buffers(codecContext);
// Seek until final frame