X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdecode.h;h=15271c529ab64bbb3d3c57963ed637c08d92c2c6;hb=2ca65fc7b74444edd51d5803a2c1e05a801a6023;hp=03fc783bba308f0e65413166fd44a29c0dfbb98c;hpb=869401cefc22e221edbf135bacaa1f21014fd001;p=ffmpeg diff --git a/libavcodec/decode.h b/libavcodec/decode.h index 03fc783bba3..15271c529ab 100644 --- a/libavcodec/decode.h +++ b/libavcodec/decode.h @@ -23,6 +23,7 @@ #include "libavutil/buffer.h" #include "libavutil/frame.h" +#include "libavutil/hwcontext.h" #include "avcodec.h" @@ -65,6 +66,14 @@ int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt); void ff_decode_bsfs_uninit(AVCodecContext *avctx); +/** + * Make sure avctx.hw_frames_ctx is set. If it's not set, the function will + * try to allocate it from hw_device_ctx. If that is not possible, an error + * message is printed, and an error code is returned. + */ +int ff_decode_get_hw_frames_ctx(AVCodecContext *avctx, + enum AVHWDeviceType dev_type); + int ff_attach_decode_data(AVFrame *frame); #endif /* AVCODEC_DECODE_H */