summaryrefslogtreecommitdiff
path: root/libavutil/hwcontext_cuda.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2016-11-29 17:37:13 +0100
committerTimo Rothenpieler <timo@rothenpieler.org>2016-11-30 12:36:23 +0100
commit52773a2c68bd8941fbe901e311224e49f2dc8ffe (patch)
tree97482577b779bd8b06b70e530809abb7d11d580f /libavutil/hwcontext_cuda.c
parent88281a5256f0034451c09acab3aff44acb43c2a3 (diff)
avutil/hwcontext_cuda: check for missing pixel format
Diffstat (limited to 'libavutil/hwcontext_cuda.c')
-rw-r--r--libavutil/hwcontext_cuda.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/hwcontext_cuda.c b/libavutil/hwcontext_cuda.c
index 2ebf4bc886..5dd0d99272 100644
--- a/libavutil/hwcontext_cuda.c
+++ b/libavutil/hwcontext_cuda.c
@@ -117,6 +117,9 @@ static int cuda_frames_init(AVHWFramesContext *ctx)
case AV_PIX_FMT_P016:
size = aligned_width * ctx->height * 3;
break;
+ default:
+ av_log(ctx, AV_LOG_ERROR, "BUG: Pixel format missing from size calculation.");
+ return AVERROR_BUG;
}
ctx->internal->pool_internal = av_buffer_pool_init2(size, ctx, cuda_pool_alloc, NULL);