Go / Last Frame or pressing the "End" key goes nowhere

Started by karl, May 05, 2012, 04:39:43 PM

Previous topic - Next topic

karl

(This bug was earlier reported in http://www.avidemux.org/smf/index.php?topic=8348.msg46631#msg46631 - but since that message contained lots of other stuff and is long ago, I open this as a new topic.)

The function "Go" / "Last Frame"  or pressing the "End" key does not cause any action. What is happening in the code:
In common/gui_navigate.cpp:143 the case ACT_End is handled by calling GUI_GoToFrame() with a frame number taken from avifileinfo->nb_frames - 1. But avifileinfo->nb_frames contains the value "1" (not an actual number of frames), and also the whole function GUI_GoToFrame() is "#if 0"ed away.

There is a work-around, which only works when you have not set "marker B" somewhere (or after you reset all edits):
Press "Page Down". This goes to "marker B", and as long as you did not set it elsewhere, this marker is at the end of the video.
Now I wonder how difficult can it be to do a similar thing when pressing "End" regardless of "marker B"?  ;)

karl

The following patch fixes the issue for me:


--- a/avidemux/common/gui_navigate.cpp
+++ b/avidemux/common/gui_navigate.cpp
@@ -142,8 +142,7 @@ static int ignore_change=0;
          break;
       case ACT_End:
             {
-                uint32_t nf = avifileinfo->nb_frames;
-                          GUI_GoToFrame(nf - 1);
+                                       GUI_GoToTime(video_body->getVideoDuration());
             }
          break;
       case ACT_Begin:

Jan Gruuthuse

With HDTV .trp loaded and pressing
Quote[nextPictureInternal]  Next picture failed
  [DecodeNextPicture]  getFrame failed for frame 64223
  [nextPictureInternal]  Next picture failed
  [DecodeNextPicture]  getFrame failed for frame 64224
  [nextPictureInternal]  Next picture failed
  [DecodeNextPicture]  getFrame failed for frame 64225
  [nextPictureInternal]  Next picture failed
  [DecodeNextPicture]  getFrame failed for frame 64226
  [nextPictureInternal]  Next picture failed
  [DecodeNextPicture]  getFrame failed for frame 64227
  [nextPictureInternal]  Next picture failed
  [DecodeNextPicture]  getFrame failed for frame 64228
  [nextPictureInternal]  Next picture failed
  [DecodeNextPicture]  getFrame failed for frame 64229
  [nextPictureInternal]  Next picture failed
  [DecodeNextPicture]  getFrame failed for frame 64230
  [nextPictureInternal]  Next picture failed
  [DecodeNextPicture]  getFrame failed for frame 64231
  [nextPictureInternal]  Next picture failed
  [DecodeNextPicture]  getFrame failed for frame 64232
  [nextPictureInternal]  Next picture failed
  [DecodeNextPicture]  getFrame failed for frame 64233
  [nextPictureInternal]  Next picture failed
  [DecodeNextPicture]  getFrame failed for frame 64234
  [nextPictureInternal]  Next picture failed
  [nextPictureInternal]  nextPictureInternal Failed
  [nextPictureInternal]  while looking for 1284320000 us, 1284320 ms
ReadIndex:10, WriteIndex:18
Edcache content[0]: PTS : 1284300000 us1284300 ms
Edcache content[1]: PTS : 1284320000 us1284320 ms
Edcache content[2]: PTS : 1284180000 us1284180 ms
Edcache content[3]: PTS : 1284200000 us1284200 ms
Edcache content[4]: PTS : 1284220000 us1284220 ms
Edcache content[5]: PTS : 1284240000 us1284240 ms
Edcache content[6]: PTS : 1284260000 us1284260 ms
Edcache content[7]: PTS : 1284280000 us1284280 ms
[seektoTime]  seekToFrame failed for frame at PTS= 1284400 ms, next image failed
  [goToTimeVideo]  Cannot seek to beginning of segment 31553440 at  1284400 ms
  [paintGL]  Painting dummy openGl widget

karl

Quote from: Jan Gruuthuse on May 06, 2012, 09:59:57 AM
With HDTV .trp loaded and pressing
[nextPictureInternal]  Next picture failed
Quote

This you experienced with the patch I proposed attached, right? Didn't happen to me, but if there are videos for which avidemux cannot position at the end, the same probably also happenes with "Go to marker B"... right?

Jan Gruuthuse


Jan Gruuthuse

Just thinking, looks like some value is doubled? 720p (progressive) 50 fps <> 100 fps?