diff options
author | wm4 <nfxjfg@googlemail.com> | 2017-10-28 20:53:38 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-11-12 02:33:45 +0300 |
commit | 7546964f96168cd6ac819ef4c3212ee586619f1a (patch) | |
tree | 69c2613e791f6ec03087b01fd43cfae3741465fd /libavcodec/nvdec_hevc.c | |
parent | 48e4eda11d537c6ed52d1000aaa6ce5cbb641e25 (diff) |
nvdec: add frames_params support
Diffstat (limited to 'libavcodec/nvdec_hevc.c')
-rw-r--r-- | libavcodec/nvdec_hevc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/nvdec_hevc.c b/libavcodec/nvdec_hevc.c index 89c1be5f7c..f02a7a15fe 100644 --- a/libavcodec/nvdec_hevc.c +++ b/libavcodec/nvdec_hevc.c @@ -258,11 +258,12 @@ static int nvdec_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, return 0; } -static int nvdec_hevc_decode_init(AVCodecContext *avctx) +static int nvdec_hevc_frame_params(AVCodecContext *avctx, + AVBufferRef *hw_frames_ctx) { const HEVCContext *s = avctx->priv_data; const HEVCSPS *sps = s->ps.sps; - return ff_nvdec_decode_init(avctx, sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering + 1); + return ff_nvdec_frame_params(avctx, hw_frames_ctx, sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering + 1); } AVHWAccel ff_hevc_nvdec_hwaccel = { @@ -273,7 +274,8 @@ AVHWAccel ff_hevc_nvdec_hwaccel = { .start_frame = nvdec_hevc_start_frame, .end_frame = ff_nvdec_end_frame, .decode_slice = nvdec_hevc_decode_slice, - .init = nvdec_hevc_decode_init, + .frame_params = nvdec_hevc_frame_params, + .init = ff_nvdec_decode_init, .uninit = ff_nvdec_decode_uninit, .priv_data_size = sizeof(NVDECContext), }; |