Fix scaling when changing crop.
authorCarl Hetherington <cth@carlh.net>
Sat, 15 Dec 2012 22:34:33 +0000 (22:34 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 15 Dec 2012 22:34:33 +0000 (22:34 +0000)
src/wx/ffmpeg_player.cc

index 8273687adc44153f9ab659fe5605297c4f0df294..4cba3de23cbecdb2dfe1d2a74985f540317402ed 100644 (file)
@@ -352,6 +352,7 @@ FFmpegPlayer::set_top_crop (int t)
 {
        _top_crop_in_source = t;
 
+       allocate_buffer_and_scaler ();
        convert_frame ();
        update_panel ();
 }
@@ -361,6 +362,7 @@ FFmpegPlayer::set_bottom_crop (int b)
 {
        _bottom_crop_in_source = b;
 
+       allocate_buffer_and_scaler ();
        convert_frame ();
        update_panel ();
 }
@@ -370,6 +372,7 @@ FFmpegPlayer::set_left_crop (int l)
 {
        _left_crop_in_source = l;
 
+       allocate_buffer_and_scaler ();
        convert_frame ();
        update_panel ();
 }
@@ -379,6 +382,7 @@ FFmpegPlayer::set_right_crop (int r)
 {
        _right_crop_in_source = r;
 
+       allocate_buffer_and_scaler ();
        convert_frame ();
        update_panel ();
 }
@@ -387,8 +391,8 @@ void
 FFmpegPlayer::set_ratio (float r)
 {
        _ratio = r;
-       allocate_buffer_and_scaler ();
 
+       allocate_buffer_and_scaler ();
        convert_frame ();
        update_panel ();
 }