Skip to content

Commit

Permalink
[UI] try to cope with go to mark A/B in a nicer way if go To pts fail…
Browse files Browse the repository at this point in the history
…s (euma)
  • Loading branch information
mean committed Oct 8, 2016
1 parent 6981cf1 commit 229c29f
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions avidemux/common/gui_navigate.cpp
Expand Up @@ -91,10 +91,31 @@ static int ignore_change=0;
case ACT_GotoMarkB:
{
uint64_t pts;
if(action==ACT_GotoMarkA) pts=video_body->getMarkerAPts();
else pts=video_body->getMarkerBPts();
GUI_GoToTime(pts);

if(action==ACT_GotoMarkA)
pts=video_body->getMarkerAPts();
else
pts=video_body->getMarkerBPts();
if(false==video_body->goToTimeVideo(pts))
{
if(action==ACT_GotoMarkA)
{
ADM_warning("Go to Marker A: Seek to time %s ms failed\n",ADM_us2plain(pts));
}else // PTS returned by getMarkerBPts() may be beyond the last frame.
// Go to the last frame then.
{
pts=video_body->getLastKeyFramePts();
if(pts==ADM_NO_PTS)
break;
admPreview::deferDisplay(1);
GUI_GoToTime(pts);
while(admPreview::nextPicture())
{
}
admPreview::deferDisplay(0);
}
}
admPreview::samePicture();
GUI_setCurrentFrameAndTime();
}
break;

Expand Down

0 comments on commit 229c29f

Please sign in to comment.