diff options
author | Anton Khirnov <anton@khirnov.net> | 2017-10-13 18:59:17 +0200 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2017-11-10 16:56:54 +0100 |
commit | 9f1cfd88af88a7d7d5c56a368a46639dfdfdef75 (patch) | |
tree | 3577d988bb3635da5ee09bb506591205577026c2 /libavcodec/wrapped_avframe.c | |
parent | 1fa3a9a31de11a2dee0efc75b89862e80ab3c90f (diff) |
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.
Diffstat (limited to 'libavcodec/wrapped_avframe.c')
-rw-r--r-- | libavcodec/wrapped_avframe.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; } |