* commit 'e85f6f7f8d037c0af0f294000718d9ba22753baa': lavc: allow using AVCodecContext.hw_frames_ctx for decoding Conflicts: doc/APIchanges libavcodec/version.h
Showing the changes to libavcodec/avcodec.h (1 of 4 files). Show all
Unified · Split
| @@ -3518,15 +3518,25 @@ typedef struct AVCodecContext { · 3517 unmodified lines | ||
| 3518 | 3518 | int nb_coded_side_data; |
| 3519 | 3519 | |
| 3520 | 3520 | /** |
| 3521 | − * Encoding only. | |
| 3521 | + * A reference to the AVHWFramesContext describing the input (for encoding) | |
| 3522 | + * or output (decoding) frames. The reference is set by the caller and | |
| 3523 | + * afterwards owned (and freed) by libavcodec. | |
| 3522 | 3524 | * |
| 3523 | − * For hardware encoders configured to use a hwaccel pixel format, this | |
| 3524 | − * field should be set by the caller to a reference to the AVHWFramesContext | |
| 3525 | − * describing input frames. AVHWFramesContext.format must be equal to | |
| 3526 | − * AVCodecContext.pix_fmt. | |
| 3525 | + * - decoding: This field should be set by the caller from the get_format() | |
| 3526 | + * callback. The previous reference (if any) will always be | |
| 3527 | + * unreffed by libavcodec before the get_format() call. | |
| 3527 | 3528 | * |
| 3528 | − * This field should be set before avcodec_open2() is called and is | |
| 3529 | − * afterwards owned and managed by libavcodec. | |
| 3529 | + * If the default get_buffer2() is used with a hwaccel pixel | |
| 3530 | + * format, then this AVHWFramesContext will be used for | |
| 3531 | + * allocating the frame buffers. | |
| 3532 | + * | |
| 3533 | + * - encoding: For hardware encoders configured to use a hwaccel pixel | |
| 3534 | + * format, this field should be set by the caller to a reference | |
| 3535 | + * to the AVHWFramesContext describing input frames. | |
| 3536 | + * AVHWFramesContext.format must be equal to | |
| 3537 | + * AVCodecContext.pix_fmt. | |
| 3538 | + * | |
| 3539 | + * This field should be set before avcodec_open2() is called. | |
| 3530 | 3540 | */ |
| 3531 | 3541 | AVBufferRef *hw_frames_ctx; |
| 3532 | 3542 | |