forked from mia/Aegisub
Better working LAVC seeking
Originally committed to SVN as r163.
This commit is contained in:
parent
6313d8eafd
commit
e8f7defb88
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue