Hello Ronald, Monday, August 3, 2015, 11:37:22 PM, you wrote:
RSB> On Mon, Aug 3, 2015 at 3:25 PM, Ivan Uskov <ivan.us...@nablet.com> wrote: >> By the way, about old implementation which "worked fine". >> It just did drop all buffered frames at decoder re-init on new >> sequence header, there is nice comment inside old qsvdec_h264.c: >> /* TODO: flush delayed frames on reinit */ RSB> Each AVCodec has a flush function which should do this. So as you RSB> suggested, you need a flushing state which means you will output "old" RSB> frames while consuming new frames and caching them internally in some way. RSB> Then, when the decoder is flushed (either because flush was called, or RSB> because all old cached frames have been returned), you can use all queued RSB> packets to reinit the hw and start outputing frames right away. Thank you for suggestion but unfortunately AVCodec::flush is useless for this issue. The AVCodec::flush intended to *drop* decoded frames and reset decoder before seeking and it calls by module outside of decoder. My task is keep all frames without losing and decoder initiates "flushing" by itself. So it is different kind of "flush". -- Best regards, Ivan mailto:ivan.us...@nablet.com _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel