lavc: add a field for passing AVHWFramesContext to encoders

This commit is contained in:
Anton Khirnov
2016-02-01 15:39:50 +01:00
parent 21f7cd4acd
commit 7b3214d005
4 changed files with 29 additions and 1 deletions

View File

@@ -2979,6 +2979,18 @@ typedef struct AVCodecContext {
AVPacketSideData *coded_side_data;
int nb_coded_side_data;
/**
* Encoding only.
*
* For hardware encoders configured to use a hwaccel pixel format, this
* field should be set by the caller to a reference to the AVHWFramesContext
* describing input frames. AVHWFramesContext.format must be equal to
* AVCodecContext.pix_fmt.
*
* This field should be set before avcodec_open2() is called and is
* afterwards owned and managed by libavcodec.
*/
AVBufferRef *hw_frames_ctx;
} AVCodecContext;
/**