Skip to content

Commit

Permalink
[GUI] Warn about cut being not on a keyframe right away
Browse files Browse the repository at this point in the history
  • Loading branch information
eumagga0x2a committed Aug 29, 2017
1 parent 68308da commit e8d4367
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions avidemux/common/gui_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,26 @@ void HandleAction (Action action)
GUI_Error_HIG(QT_TRANSLATE_NOOP("adm","Cutting"),QT_TRANSLATE_NOOP("adm","Error while cutting out."));
break;
}
if(!UI_getCurrentVCodec() && !video_body->checkCutsAreOnIntra())
{
const char *alert;
if(action==ACT_Cut)
{
alert=QT_TRANSLATE_NOOP("adm","The end point of the cut is not on a keyframe.\n"
"Video saved in copy mode will be corrupted at this point.\n"
"Proceed anyway?");
}else
{
alert=QT_TRANSLATE_NOOP("adm","The end point of the deletion is not on a keyframe.\n"
"Video saved in copy mode will be corrupted at this point.\n"
"Proceed anyway?");
}
if(!GUI_Question(alert))
{
video_body->undo();
break;
}
}
A_ResetMarkers();
A_Resync(); // total duration & stuff

Expand Down

0 comments on commit e8d4367

Please sign in to comment.