mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ffmpeg: warns the user when the selected pixel format is ignored
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
91199cfe55
commit
b568d6d94b
9
ffmpeg.c
9
ffmpeg.c
@ -590,10 +590,17 @@ static void choose_pixel_fmt(AVStream *st, AVCodec *codec)
|
||||
if(*p == st->codec->pix_fmt)
|
||||
break;
|
||||
}
|
||||
if(*p == -1)
|
||||
if (*p == -1) {
|
||||
if(st->codec->pix_fmt != PIX_FMT_NONE)
|
||||
av_log(NULL, AV_LOG_WARNING,
|
||||
"Incompatible pixel format '%s' for codec '%s', auto-selecting format '%s'\n",
|
||||
av_pix_fmt_descriptors[st->codec->pix_fmt].name,
|
||||
codec->name,
|
||||
av_pix_fmt_descriptors[codec->pix_fmts[0]].name);
|
||||
st->codec->pix_fmt = codec->pix_fmts[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static AVOutputStream *new_output_stream(AVFormatContext *oc, int file_idx)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user