[FFmpeg-devel] QSV Decoding - Issues and Regressions
Ronald S. Bultje
rsbultje at gmail.com
Mon Aug 3 22:37:22 CEST 2015
Hi,
On Mon, Aug 3, 2015 at 3:25 PM, Ivan Uskov <ivan.uskov at 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 */
Each AVCodec has a flush function which should do this. So as you
suggested, you need a flushing state which means you will output "old"
frames while consuming new frames and caching them internally in some way.
Then, when the decoder is flushed (either because flush was called, or
because all old cached frames have been returned), you can use all queued
packets to reinit the hw and start outputing frames right away.
Ronald
More information about the ffmpeg-devel
mailing list