From b33e2665a1f1bed17ba29399e284e6f3ea7bf175 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Mon, 8 Apr 2019 21:30:29 +0200 Subject: [PATCH] [xcode] Hardcode png/jpeg pix formats (fix for #717) ffmpeg changed the behaviour of avcodec_default_get_format() so that it picks AV_PIX_FMT_MONOBLACK instead of AV_PIX_FMT_RGB24 for the png encoder. That makes the function of no use to us, so now the pix formats are just hardcoded in the settings instead. --- src/transcode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/transcode.c b/src/transcode.c index e4170e0e..580795b8 100644 --- a/src/transcode.c +++ b/src/transcode.c @@ -234,6 +234,7 @@ init_settings(struct settings_ctx *settings, enum transcode_profile profile, str settings->silent = 1; settings->format = "image2"; settings->in_format = "mjpeg"; + settings->pix_fmt = AV_PIX_FMT_YUVJ420P; settings->video_codec = AV_CODEC_ID_MJPEG; break; @@ -241,6 +242,7 @@ init_settings(struct settings_ctx *settings, enum transcode_profile profile, str settings->encode_video = 1; settings->silent = 1; settings->format = "image2"; + settings->pix_fmt = AV_PIX_FMT_RGB24; settings->video_codec = AV_CODEC_ID_PNG; break;