[FFmpeg-devel,2/2] lavc/libx265: switch to ff_alloc_packet2

Submitted by Jun Zhao on Nov. 9, 2017, 12:39 a.m.

Details

Message ID cff6bd3c-d4c9-476c-ac28-191085c1ff81@gmail.com
State New
Headers show

Commit Message

Jun Zhao Nov. 9, 2017, 12:39 a.m.
From 5afdf252b3bb6f8c7a276c2a8bde8f4a95d170e4 Mon Sep 17 00:00:00 2001
From: Jun Zhao <jun.zhao@intel.com>
Date: Wed, 8 Nov 2017 21:04:51 +0800
Subject: [PATCH 2/2] lavc/libx265: switch to ff_alloc_packet2

ff_alloc_packet have been deprecated, switch to use
ff_alloc_packet2.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
---
 libavcodec/libx265.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Derek Buitenhuis Nov. 9, 2017, 1:51 p.m.
On 11/9/2017 12:39 AM, Jun Zhao wrote:
> From 5afdf252b3bb6f8c7a276c2a8bde8f4a95d170e4 Mon Sep 17 00:00:00 2001
> From: Jun Zhao <jun.zhao@intel.com>
> Date: Wed, 8 Nov 2017 21:04:51 +0800
> Subject: [PATCH 2/2] lavc/libx265: switch to ff_alloc_packet2
> 
> ff_alloc_packet have been deprecated, switch to use
> ff_alloc_packet2.
> 
> Signed-off-by: Jun Zhao <jun.zhao@intel.com>
> ---
>  libavcodec/libx265.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Should be OK.

- Derek

Patch hide | download patch | download mbox

diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 784b51c52d..4456e300f2 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -294,7 +294,7 @@  static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     for (i = 0; i < nnal; i++)
         payload += nal[i].sizeBytes;
 
-    ret = ff_alloc_packet(pkt, payload);
+    ret = ff_alloc_packet2(avctx, pkt, payload, payload);
     if (ret < 0) {
         av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n");
         return ret;