Did you ever figure this issue out? I think I'm hitting it as well. ~ Nathan
On Thu, Jan 10, 2013 at 8:21 AM, Ronny Wegener <[email protected]> wrote: > Hi, > > i have a simple program that reads all video packets from a file, > decodes them into a frame and prints the corresponding timestamps. > This works fine. > > Output (test.avi): > > packet.pts=0 => frame.pts=0 > packet.pts=1 => frame.pts=1 > packet.pts=2 => frame.pts=2 > packet.pts=3 => frame.pts=3 > packet.pts=4 => frame.pts=4 > packet.pts=5 => frame.pts=5 > packet.pts=6 => frame.pts=6 > > when i use the avformat_find_stream_info() function in advance, which > is reading some packets to determine information about the streams, > the first packets are not decoded successfully and the following > decoded frames got a "shifted" timestamp. > > Output (test.avi): > > packet.pts=0 => FRAME NOT FINISHED > packet.pts=1 => FRAME NOT FINISHED > packet.pts=2 => FRAME NOT FINISHED > packet.pts=3 => FRAME NOT FINISHED > packet.pts=4 => frame.pts=0 > packet.pts=5 => frame.pts=1 > packet.pts=6 => frame.pts=2 > > i guess the internal packet buffer is not flushed correctly after > avformat_find_stream_info(). I already tried to free the packet_buffer > and raw_packet_buffer in AVFormatContext, but this didn't worked. So > any suggestions how to fix this without closing and re-opening the > file? > > Code to reproduce the problem: http://pastebin.com/UzTuZBL6 > Project to reproduce the problem: http://rghost.net/42877696 > _______________________________________________ > libav-api mailing list > [email protected] > https://lists.libav.org/mailman/listinfo/libav-api > _______________________________________________ libav-api mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-api
