From ce5870a3a8f2b10668ee4f04c2ae0287f66f31b2 Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Sun, 11 Feb 2018 00:51:33 +0000 Subject: cbs: Refcount all the things! This makes it easier for users of the CBS API to get alloc/free right - all subelements use the buffer API so that it's clear how to free them. It also allows eliding some redundant copies: the packet -> fragment copy disappears after this change if the input packet is refcounted, and more codec-specific cases are now possible (but not included in this patch). --- libavcodec/vaapi_encode_h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/vaapi_encode_h264.c') diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index a9f8832e20..74a6417e0d 100644 --- a/libavcodec/vaapi_encode_h264.c +++ b/libavcodec/vaapi_encode_h264.c @@ -133,7 +133,7 @@ static int vaapi_encode_h264_add_nal(AVCodecContext *avctx, int err; err = ff_cbs_insert_unit_content(priv->cbc, au, -1, - header->nal_unit_type, nal_unit); + header->nal_unit_type, nal_unit, NULL); if (err < 0) { av_log(avctx, AV_LOG_ERROR, "Failed to add NAL unit: " "type = %d.\n", header->nal_unit_type); -- cgit v1.2.3