From 0dc71915ae5b5abee6b40154e8fd07c4057e7bd4 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Wed, 28 Feb 2018 17:09:46 +0100 Subject: [PATCH] am7xxx-play: add a comment to explain why a run-time warning can be ignored Using the AV_PIX_FMT_YUVJ420P pixel format results n a run-time warning from swscaler: [swscaler @ 0x5600046b3cc0] deprecated pixel format used, make sure you did set range correctly However this cannot be changed because the mjpeg codec relies on it, otherwise it fails with the following error message: [mjpeg @ 0x560eea5f5360] Specified pixel format yuv420p is invalid or not supported So just add a comment, to avoid loosing time figuring things out again in the future. --- examples/am7xxx-play.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/am7xxx-play.c b/examples/am7xxx-play.c index e3ceb5c..5dab320 100644 --- a/examples/am7xxx-play.c +++ b/examples/am7xxx-play.c @@ -211,6 +211,7 @@ static int video_output_init(struct video_output_ctx *output_ctx, goto out; } + /* YUVJ420P is deprecated in swscaler, but mjpeg still relies on it. */ output_codec_ctx->pix_fmt = AV_PIX_FMT_YUVJ420P; output_codec_ctx->codec_id = AV_CODEC_ID_MJPEG; output_codec_ctx->codec_type = AVMEDIA_TYPE_VIDEO; -- 2.1.4