Wrong first frame using new decode API
|Reported by:||s0m3||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
I'm developping a multimedia player based on ffmpeg.
To do frame stepping, I need to associate frame numbers and frame times (timecodes).
If AVStream::nb_index_entries is != 0, I use AVIndexEntry structure, otherwise, I build an "index" manually.
Building the "index" is as simple as decoding frames until we reach the end of the file. When decoding frames, I can retrieve frame times (pts) and store them.
My issue is that the first frame I get is not the first one, its pts is not 0, its the (correct) pts of the third frame so I miss 2 frames.
I suspect frames content are correct (what is displayed) but their pts is not. It's hard to tell because first frames of the sample file are identical.
I use the new decoding API so it may be a bug there or I may not use it correctly.
Anyway, a test case is provided.
The sample is "simpsons_movie_1080p_trailer.zip" from http://www.h264info.com/clips.html. MD5 is ff37f121ea26b09c926926a6ba737194
I tested it on windows with ffmpeg v3.2.4 and git version 20170404-1229007-win32 (win32 build)