Skip to content

Commit

Permalink
[editor] Don't try to skip decoding on rewind
Browse files Browse the repository at this point in the history
  • Loading branch information
eumagga0x2a committed Jan 5, 2018
1 parent 750137b commit f307817
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions avidemux/common/ADM_editor/src/ADM_edRenderInternal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,16 @@ bool ADM_Composer::seektoTime(uint32_t ref,uint64_t timeToSeek,bool dontdecode)
EditorCache *cache =vid->_videoCache;
ADM_assert(cache);
bool found=false;
ADMImage *image=cache->getByPts(timeToSeek);
if(image)
if(timeToSeek>vid->firstFramePts)
{
vid->lastReadPts=timeToSeek;
ADM_info("Image found in cache, pts=%" PRIu64" ms\n",timeToSeek/1000);
endOfStream=false;
return true;
ADMImage *image=cache->getByPts(timeToSeek);
if(image)
{
vid->lastReadPts=timeToSeek;
ADM_info("Image found in cache, pts=%" PRIu64" ms\n",timeToSeek/1000);
endOfStream=false;
return true;
}
}
// Search the previous keyframe for segment....
uint64_t seekTime;
Expand Down

0 comments on commit f307817

Please sign in to comment.