aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/nvenc.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2019-12-20 15:34:33 -0800
committerPhilip Langdale <philipl@overt.org>2020-01-08 19:20:36 -0800
commit3ea705767720033754e8d85566460390191ae27d (patch)
tree6a1e3ecef1311a5eb427e1ed42124f371208e9c5 /libavcodec/nvenc.c
parent94cdf82d53fe9be260dc6106634a9f9b218211bd (diff)
downloadffmpeg-3ea705767720033754e8d85566460390191ae27d.tar.gz
nvenc: implement flush to help allow an encoder to be re-used
It can be useful to re-use an encoder instance when doing segmented encodings, and this requires flushing the encoder at the start of each segment.
Diffstat (limited to 'libavcodec/nvenc.c')
-rw-r--r--libavcodec/nvenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 310e30805d..9a96bf2bba 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -2262,3 +2262,8 @@ int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return 0;
}
+
+av_cold void ff_nvenc_encode_flush(AVCodecContext *avctx)
+{
+ ff_nvenc_send_frame(avctx, NULL);
+}