[FFmpeg-trac] #6989(avcodec:open): Hwaccel cuvid fails with “Error creating a NVDEC decoder: 1”

FFmpeg trac at avcodec.org
Thu Mar 5 02:48:23 EET 2020


#6989: Hwaccel cuvid fails with “Error creating a NVDEC decoder: 1”
-------------------------------------+-------------------------------------
             Reporter:  tkalliom     |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  hwaccel      |               Blocked By:
  cuda cuvid NVDEC                   |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by Balling):

 Did you try

 {{{
 diff --git a/libavcodec/nvdec.c b/libavcodec/nvdec.c
 index b60da24301..9b97d02a67 100644
 --- a/libavcodec/nvdec.c
 +++ b/libavcodec/nvdec.c
 @@ -300,7 +300,7 @@ int ff_nvdec_decode_init(AVCodecContext *avctx)
      }
      chroma_444 = ctx->supports_444 && cuvid_chroma_format ==
 cudaVideoChromaFormat_444;

 -    if (!avctx->hw_frames_ctx) {
 +    if (avctx->hw_frames_ctx) {
          ret = ff_decode_get_hw_frames_ctx(avctx, AV_HWDEVICE_TYPE_CUDA);
          if (ret < 0)
              return ret;
 }}}

 before the latest commit?

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6989#comment:15>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list