OSDN Git Service

nvenc: Properly free the fifos
authorLuca Barbato <lu_zero@gentoo.org>
Sun, 23 Aug 2015 23:29:59 +0000 (01:29 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 25 Aug 2015 17:47:43 +0000 (19:47 +0200)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/nvenc.c

index cd4e065..3f19ed0 100644 (file)
@@ -771,6 +771,10 @@ av_cold int ff_nvenc_encode_close(AVCodecContext *avctx)
     NV_ENCODE_API_FUNCTION_LIST *nv = &ctx->nvel.nvenc_funcs;
     int i;
 
+    av_fifo_free(ctx->timestamps);
+    av_fifo_free(ctx->pending);
+    av_fifo_free(ctx->ready);
+
     if (ctx->in) {
         for (i = 0; i < ctx->nb_surfaces; ++i) {
             nv->nvEncDestroyInputBuffer(ctx->nvenc_ctx, ctx->in[i].in);