---
A bit hacky, but allows the common way to fix running out of frames 
(decode->encode with lots of lookahead doesn't currently work).


 avtools/avconv_qsv.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/avtools/avconv_qsv.c b/avtools/avconv_qsv.c
index 723c6e022..de0269040 100644
--- a/avtools/avconv_qsv.c
+++ b/avtools/avconv_qsv.c
@@ -83,6 +83,9 @@ int qsv_init(AVCodecContext *s)
     frames_ctx->initial_pool_size = 32;
     frames_hwctx->frame_type      = MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET;
 
+    if (s->extra_hw_frames >= 0)
+        frames_ctx->initial_pool_size += s->extra_hw_frames;
+
     ret = av_hwframe_ctx_init(ist->hw_frames_ctx);
     if (ret < 0) {
         av_log(NULL, AV_LOG_ERROR, "Error initializing a QSV frame pool\n");
-- 
2.11.0

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to