[FFmpeg-cvslog] avutil/hwcontext_cuda: check for missing pixel format
Timo Rothenpieler
git at videolan.org
Wed Nov 30 13:42:39 EET 2016
ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Tue Nov 29 17:37:13 2016 +0100| [52773a2c68bd8941fbe901e311224e49f2dc8ffe] | committer: Timo Rothenpieler
avutil/hwcontext_cuda: check for missing pixel format
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52773a2c68bd8941fbe901e311224e49f2dc8ffe
---
libavutil/hwcontext_cuda.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavutil/hwcontext_cuda.c b/libavutil/hwcontext_cuda.c
index 2ebf4bc..5dd0d99 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);
More information about the ffmpeg-cvslog
mailing list