diff options
author | wm4 <nfxjfg@googlemail.com> | 2017-10-28 19:53:38 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-11-11 20:33:45 -0300 |
commit | 7546964f96168cd6ac819ef4c3212ee586619f1a (patch) | |
tree | 69c2613e791f6ec03087b01fd43cfae3741465fd /libavcodec/nvdec_h264.c | |
parent | 48e4eda11d537c6ed52d1000aaa6ce5cbb641e25 (diff) | |
download | ffmpeg-streaming-7546964f96168cd6ac819ef4c3212ee586619f1a.zip ffmpeg-streaming-7546964f96168cd6ac819ef4c3212ee586619f1a.tar.gz |
nvdec: add frames_params support
Diffstat (limited to 'libavcodec/nvdec_h264.c')
-rw-r--r-- | libavcodec/nvdec_h264.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/nvdec_h264.c b/libavcodec/nvdec_h264.c index 75dd4b2..b0e756c 100644 --- a/libavcodec/nvdec_h264.c +++ b/libavcodec/nvdec_h264.c @@ -155,11 +155,12 @@ static int nvdec_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, 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 = { @@ -170,7 +171,8 @@ AVHWAccel ff_h264_nvdec_hwaccel = { .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), }; |