ffmpeg: warns the user when the selected pixel format is ignored
This commit is contained in:
8
ffmpeg.c
8
ffmpeg.c
@@ -593,9 +593,15 @@ static void choose_pixel_fmt(AVStream *st, AVCodec *codec)
|
|||||||
if(*p == st->codec->pix_fmt)
|
if(*p == st->codec->pix_fmt)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(*p == -1)
|
if (*p == -1) {
|
||||||
|
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];
|
st->codec->pix_fmt = codec->pix_fmts[0];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static AVOutputStream *new_output_stream(AVFormatContext *oc, int file_idx)
|
static AVOutputStream *new_output_stream(AVFormatContext *oc, int file_idx)
|
||||||
|
Reference in New Issue
Block a user