It sounds interesting, that is exactly what I want. Could you elaborate a bit more on the steps how to create this queue? Do I only need to save the packet pointers?
On 20/06/2014, sithruk sana <[email protected]> wrote: > How about creating a queue and keep the packet in it, you can get whenever > you want from queue, and decode it ?. > > > On Thu, Jun 19, 2014 at 1:15 AM, Camera Man <[email protected]> > wrote: > >> On 06/18/2014 03:54 PM, Slash wrote: >> >> I have tried using av_seek_frame(pFormatCtx, videoStream, 0, >>> AVSEEK_FLAG_ANY) to jump back to the beginning but apparently I >>> didn't get any new decoded data so it is not doing what I need. >>> >> >> You need to flush the decoder context by calling >> avcodec_flush_buffers(your_codeccontext) after calling av_seek. Also, >> make sure that your stream starts with an SPS+PPS pair followed by an >> I-frame. Until you've decoded those, you can't decode any picture. If you >> seek to the beginning of a properly encoded file, they would be there; >> however, if the file is not properly encoded, you seek to the middle, or >> you are using a recorded RTSP stream, they might come later or not at all >> (in RTSP they may arrive in a side channel) >> >> (It is AVCodecContext that references B and P frames, not AVPacket as >> someone suggested). >> >> >> _______________________________________________ >> 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
