It's sounds a bit like you're seeing multi-threaded decoding, in which each decode call gets back a frame that was previously passed in as a packet, and was decoded on another thread.
The returned frame should have an associated PTS, so it's not a problem. Set the number of threads to 1 in your codec context and see if it changes. Bruce > On Oct 22, 2014, at 02:53, Info || Non-Lethal Applications > <[email protected]> wrote: > > I’m having problems with my own movie player I wrote using the FFmpeg > libraries. > The problem appears with a test DV clip created by Apple’s Compressor. It’s a > generated clip, so I can upload it if it helps. > > Let me quickly outline what I’m doing: > > - I read video frames into a frame queue which is used as a source for > playback > - I read audio samples into a ring buffer which is used as a source for > playback > > To not risk audio dropouts, I’m reading about 200 ms audio samples more than > I would need to display the respective video frames. > While reading audio samples, I’m storing all video packets that come along in > a video packet queue. > When the next video frame is requested, I’m searching the queue first and > read from the file only when the queue is empty. > This procedure worked fine for all other formats I’ve been working with so > far (mostly MOV and MXF). > > I’ve been analyzing the issue for a couple of hours now and it seems to me > that the packets that I put to the queue contain different content when I > decode them later on. > Actually, it seems that all packets in the queue decode to the frame that > would be next in line when reading from the file. > > Is there anything I could do to prevent this from happening? > As I said I would be happy to upload the file. It’s 2 minutes of DV PAL, > about 430 MB in size. I could make it smaller. > > Thanks in advance! > > Best, > > Flo > _______________________________________________ > Libav-user mailing list > [email protected] > http://ffmpeg.org/mailman/listinfo/libav-user _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
