[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.
This commit is contained in:
ejurgensen 2019-04-08 21:30:29 +02:00
parent 02cd65a992
commit b33e2665a1

View File

@ -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;