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 359a8a3e2d.
This commit is contained in:
Anton Khirnov
2017-10-13 18:59:17 +02:00
committed by Timo Rothenpieler
parent 1fa3a9a31d
commit 9f1cfd88af
3 changed files with 67 additions and 2 deletions

View File

@@ -21,8 +21,17 @@
#ifndef AVCODEC_DECODE_H
#define AVCODEC_DECODE_H
#include "libavutil/buffer.h"
#include "avcodec.h"
/**
* This struct stores per-frame lavc-internal data and is attached to it via
* private_ref.
*/
typedef struct FrameDecodeData {
} FrameDecodeData;
/**
* Called by decoders to get the next packet for decoding.
*
@@ -36,4 +45,6 @@ int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt);
void ff_decode_bsfs_uninit(AVCodecContext *avctx);
int ff_attach_decode_data(AVFrame *frame);
#endif /* AVCODEC_DECODE_H */