return 0;
}
-static int nvdec_h264_decode_init(AVCodecContext *avctx)
+static int nvdec_h264_frame_params(AVCodecContext *avctx,
+ AVBufferRef *hw_frames_ctx)
{
const H264Context *h = avctx->priv_data;
const SPS *sps = h->ps.sps;
- return ff_nvdec_decode_init(avctx, sps->ref_frame_count + sps->num_reorder_frames);
+ return ff_nvdec_frame_params(avctx, hw_frames_ctx, sps->ref_frame_count + sps->num_reorder_frames);
}
-AVHWAccel ff_h264_nvdec_hwaccel = {
+const AVHWAccel ff_h264_nvdec_hwaccel = {
.name = "h264_nvdec",
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_H264,
.start_frame = nvdec_h264_start_frame,
.end_frame = ff_nvdec_end_frame,
.decode_slice = nvdec_h264_decode_slice,
- .init = nvdec_h264_decode_init,
+ .frame_params = nvdec_h264_frame_params,
+ .init = ff_nvdec_decode_init,
.uninit = ff_nvdec_decode_uninit,
.priv_data_size = sizeof(NVDECContext),
};