Count frame number from 1. Move panel refresh to after getting the new frame on...
authorCarl Hetherington <cth@carlh.net>
Thu, 30 May 2013 12:02:31 +0000 (13:02 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 30 May 2013 12:02:31 +0000 (13:02 +0100)
src/wx/film_viewer.cc

index a5920b4bb0f3c2a5ddad552532d3b574f136a9dd..6845031cf96cf2688775bef192da3548093de5bb 100644 (file)
@@ -207,9 +207,6 @@ FilmViewer::timer (wxTimerEvent &)
                return;
        }
        
-       _panel->Refresh ();
-       _panel->Update ();
-
        get_frame ();
 
        if (_film->length()) {
@@ -218,6 +215,9 @@ FilmViewer::timer (wxTimerEvent &)
                        _slider->SetValue (new_slider_position);
                }
        }
+
+       _panel->Refresh ();
+       _panel->Update ();
 }
 
 
@@ -413,7 +413,8 @@ FilmViewer::process_video (shared_ptr<const Image> image, bool, shared_ptr<Subti
        _got_frame = true;
 
        double const fps = _decoders.video->frames_per_second ();
-       _frame->SetLabel (wxString::Format (wxT("%d"), int (rint (t * fps))));
+       /* Count frame number from 1 ... not sure if this is the best idea */
+       _frame->SetLabel (wxString::Format (wxT("%d"), int (rint (t * fps)) + 1));
 
        double w = t;
        int const h = (w / 3600);