]> git.sesse.net Git - ffmpeg/blobdiff - ffmpeg_cuvid.c
ffmpeg: move flushing the queued frames to configure_filtergraph()
[ffmpeg] / ffmpeg_cuvid.c
index 766878f58bc3c75a32fd8498e4915e0d7dc21009..46540795d454c0709c49bda1330707b711d27254 100644 (file)
@@ -125,7 +125,6 @@ int cuvid_transcode_init(OutputStream *ost)
         }
 
         ist->hwaccel_ctx = ctx;
-        ist->resample_pix_fmt = AV_PIX_FMT_CUDA;
         ist->hwaccel_uninit = cuvid_uninit;
 
         /* This is a bit hacky, av_hwframe_ctx_init is called by the cuvid decoder
@@ -135,7 +134,7 @@ int cuvid_transcode_init(OutputStream *ost)
          */
         hwframe_ctx = (AVHWFramesContext*)ctx->hw_frames_ctx->data;
         hwframe_ctx->format = AV_PIX_FMT_CUDA;
-        hwframe_ctx->sw_format = AV_PIX_FMT_NV12;
+        hwframe_ctx->sw_format = ist->st->codecpar->format == AV_PIX_FMT_YUV420P10 ? AV_PIX_FMT_P010 : AV_PIX_FMT_NV12;
     }
 
     return 0;