X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fnvdec_hevc.c;h=f02a7a15feb960454f1ceb0f0c067eeec69b882d;hb=65e0a7c473f23f1833538ffecf53c81fe500b5e4;hp=89c1be5f7c874c8b07654e5fda4bfcf6b8776adc;hpb=9194d3d3806f47941109a82ef1ff1f704e8e5b24;p=ffmpeg diff --git a/libavcodec/nvdec_hevc.c b/libavcodec/nvdec_hevc.c index 89c1be5f7c8..f02a7a15feb 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), };