From 9f1cfd88af88a7d7d5c56a368a46639dfdfdef75 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 13 Oct 2017 18:59:17 +0200 Subject: decode: add a method for attaching lavc-internal data to frames Use the AVFrame.private_ref field. This new struct will be useful in the following commits. Merges Libav commit 359a8a3e2d1194b52b6c386f94fd0929567dfb67. --- libavcodec/wrapped_avframe.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libavcodec/wrapped_avframe.c') diff --git a/libavcodec/wrapped_avframe.c b/libavcodec/wrapped_avframe.c index 5f88a668b9..85ff32d13a 100644 --- a/libavcodec/wrapped_avframe.c +++ b/libavcodec/wrapped_avframe.c @@ -25,6 +25,7 @@ */ #include "avcodec.h" +#include "decode.h" #include "internal.h" #include "libavutil/internal.h" @@ -98,6 +99,12 @@ static int wrapped_avframe_decode(AVCodecContext *avctx, void *data, av_frame_move_ref(out, in); + err = ff_attach_decode_data(out); + if (err < 0) { + av_frame_unref(out); + return err; + } + *got_frame = 1; return 0; } -- cgit v1.2.3