X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ftransportque.C;h=35d6f1f34205447fa71f673de5478718c03eb9f0;hb=3ceaf97d3b161445161eb5d48f3e8d5e9c34e3f8;hp=816e81a41d558f8268d8d08f59492e0f144ea5d1;hpb=60f8df69db9ddd8148bfc41a17bb0955b52a45e6;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/transportque.C b/cinelerra-5.1/cinelerra/transportque.C index 816e81a4..35d6f1f3 100644 --- a/cinelerra-5.1/cinelerra/transportque.C +++ b/cinelerra-5.1/cinelerra/transportque.C @@ -101,9 +101,8 @@ TransportCommand& TransportCommand::operator=(TransportCommand &command) int TransportCommand::single_frame(int command) { - return (command == SINGLE_FRAME_FWD || - command == SINGLE_FRAME_REWIND || - command == CURRENT_FRAME); + return (command == SINGLE_FRAME_FWD || command == SINGLE_FRAME_REWIND || + command == CURRENT_FRAME || command == LAST_FRAME); } int TransportCommand::single_frame() { @@ -125,6 +124,7 @@ int TransportCommand::get_direction(int command) case NORMAL_REWIND: case FAST_REWIND: case SLOW_REWIND: + case LAST_FRAME: return PLAY_REVERSE; default: @@ -149,6 +149,7 @@ float TransportCommand::get_speed(int command) case SINGLE_FRAME_FWD: case SINGLE_FRAME_REWIND: case CURRENT_FRAME: + case LAST_FRAME: return 1.; case FAST_FWD: @@ -210,6 +211,7 @@ void TransportCommand::set_playback_range(EDL *edl, break; case CURRENT_FRAME: + case LAST_FRAME: case SINGLE_FRAME_FWD: end_position = start_position + frame_period; break; @@ -219,8 +221,9 @@ void TransportCommand::set_playback_range(EDL *edl, break; } - if( use_displacement && command != CURRENT_FRAME && - get_direction() == PLAY_FORWARD ) { + if( use_displacement && ( + (command != CURRENT_FRAME && get_direction() == PLAY_FORWARD ) || + (command != LAST_FRAME && get_direction() == PLAY_REVERSE ) ) ) { start_position += frame_period; end_position += frame_period; displacement = 1;