summaryrefslogtreecommitdiff
path: root/ffmpeg_cuvid.c
diff options
context:
space:
mode:
authorsumit <sumita@nvidia.com>2017-01-31 21:00:50 +0530
committerTimo Rothenpieler <timo@rothenpieler.org>2017-02-01 14:55:39 +0100
commit479241da37dadf10bae3b1dd9db79e354df45e11 (patch)
tree11a46e2b9bff024f99745e30a5bbbfb5e4fd4778 /ffmpeg_cuvid.c
parent26d5caf67994eb8ea34c16144b1de4920c8a7403 (diff)
ffmpeg_cuvid: add 420 10-bit transcode support for hwaccel cuvid
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'ffmpeg_cuvid.c')
-rw-r--r--ffmpeg_cuvid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffmpeg_cuvid.c b/ffmpeg_cuvid.c
index 766878f58b..baf6eee9f8 100644
--- a/ffmpeg_cuvid.c
+++ b/ffmpeg_cuvid.c
@@ -135,7 +135,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;