diff options
author | James Almer <jamrial@gmail.com> | 2016-09-28 13:22:00 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-09-28 13:22:00 -0300 |
commit | 32c25f06b79f9edcda726f6e043325d40036cdce (patch) | |
tree | 46e89e540424ad2111c5d65910d2351645ef67f0 /libavcodec/avcodec.h | |
parent | 0153cc49b20ac6c54d5bcd86f5ce53357e6b29aa (diff) | |
parent | e85f6f7f8d037c0af0f294000718d9ba22753baa (diff) |
Merge commit 'e85f6f7f8d037c0af0f294000718d9ba22753baa'
* commit 'e85f6f7f8d037c0af0f294000718d9ba22753baa':
lavc: allow using AVCodecContext.hw_frames_ctx for decoding
Conflicts:
doc/APIchanges
libavcodec/version.h
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index b1741166e9..d72ee071bf 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3518,15 +3518,25 @@ typedef struct AVCodecContext { int nb_coded_side_data; /** - * Encoding only. + * A reference to the AVHWFramesContext describing the input (for encoding) + * or output (decoding) frames. The reference is set by the caller and + * afterwards owned (and freed) by libavcodec. * - * 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. + * - decoding: This field should be set by the caller from the get_format() + * callback. The previous reference (if any) will always be + * unreffed by libavcodec before the get_format() call. * - * This field should be set before avcodec_open2() is called and is - * afterwards owned and managed by libavcodec. + * If the default get_buffer2() is used with a hwaccel pixel + * format, then this AVHWFramesContext will be used for + * allocating the frame buffers. + * + * - encoding: 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. */ AVBufferRef *hw_frames_ctx; |