[FFmpeg-devel] [PATCH v2 2/2] ffmpeg: Add cuvid hwaccel support

Andrey Turkin andrey.turkin at gmail.com
Tue Jun 7 03:58:56 CEST 2016


2016-06-07 1:08 GMT+03:00 Timo Rothenpieler <timo at rothenpieler.org>:

> +    ost->enc_ctx->hw_frames_ctx = av_buffer_ref(ctx->hw_frames_ctx);
> +    ost->enc_ctx->pix_fmt = AV_PIX_FMT_CUDA;
> +
> +    if (!ist->hwaccel_ctx) {
> +        ist->hwaccel_ctx = ctx;
> +        ist->hw_frames_ctx = ctx->hw_frames_ctx;
> +        ist->dec_ctx->hw_frames_ctx = av_buffer_ref(ctx->hw_frames_ctx);
>

ist->hw_frames_ctx should get new reference too; also all the references
should be checked in case av_buffer_ref fails.


More information about the ffmpeg-devel mailing list