Sfoglia il codice sorgente

minor pstats adjustment

David Rose 14 anni fa
parent
commit
7fc41e9cb8
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      panda/src/movies/ffmpegVideoCursor.cxx

+ 3 - 3
panda/src/movies/ffmpegVideoCursor.cxx

@@ -757,9 +757,6 @@ fetch_frame(double time) {
   _begin_time = _packet_time;
   _begin_time = _packet_time;
 
 
   if (_packet_time <= time) {
   if (_packet_time <= time) {
-    static PStatCollector seek_pcollector("*:FFMPEG Video Decoding:Seek");
-    PStatTimer timer(seek_pcollector);
-
     _video_ctx->skip_frame = AVDISCARD_BIDIR;
     _video_ctx->skip_frame = AVDISCARD_BIDIR;
     // Put the current packet aside in case we discover it's the
     // Put the current packet aside in case we discover it's the
     // packet to keep.
     // packet to keep.
@@ -776,6 +773,9 @@ fetch_frame(double time) {
       return true;
       return true;
     }
     }
     while (_packet_time <= time) {
     while (_packet_time <= time) {
+      static PStatCollector seek_pcollector("*:FFMPEG Video Decoding:Seek");
+      PStatTimer timer(seek_pcollector);
+
       // Decode and discard the previous packet.
       // Decode and discard the previous packet.
 #if LIBAVCODEC_VERSION_INT < 3414272
 #if LIBAVCODEC_VERSION_INT < 3414272
       avcodec_decode_video(_video_ctx, _frame,
       avcodec_decode_video(_video_ctx, _frame,