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_mpeg2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/vaapi_encode_mpeg2.c') diff --git a/libavcodec/vaapi_encode_mpeg2.c b/libavcodec/vaapi_encode_mpeg2.c index 39f1e4b5f2..df26ed4c89 100644 --- a/libavcodec/vaapi_encode_mpeg2.c +++ b/libavcodec/vaapi_encode_mpeg2.c @@ -92,7 +92,7 @@ static int vaapi_encode_mpeg2_add_header(AVCodecContext *avctx, VAAPIEncodeMPEG2Context *priv = ctx->priv_data; int err; - err = ff_cbs_insert_unit_content(priv->cbc, frag, -1, type, header); + err = ff_cbs_insert_unit_content(priv->cbc, frag, -1, type, header, NULL); if (err < 0) { av_log(avctx, AV_LOG_ERROR, "Failed to add header: " "type = %d.\n", type); -- cgit v1.2.3