|
|
|
@@ -37,7 +37,7 @@ enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodec *codec, enum AVPixelFo |
|
|
|
{ |
|
|
|
if (codec && codec->pix_fmts) { |
|
|
|
const enum AVPixelFormat *p = codec->pix_fmts; |
|
|
|
int has_alpha= av_pix_fmt_descriptors[target].nb_components % 2 == 0; |
|
|
|
int has_alpha= av_pix_fmt_desc_get(target)->nb_components % 2 == 0; |
|
|
|
enum AVPixelFormat best= AV_PIX_FMT_NONE; |
|
|
|
if (st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) { |
|
|
|
if (st->codec->codec_id == AV_CODEC_ID_MJPEG) { |
|
|
|
@@ -56,9 +56,9 @@ enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodec *codec, enum AVPixelFo |
|
|
|
if (target != AV_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[target].name, |
|
|
|
av_get_pix_fmt_name(target), |
|
|
|
codec->name, |
|
|
|
av_pix_fmt_descriptors[best].name); |
|
|
|
av_get_pix_fmt_name(best)); |
|
|
|
return best; |
|
|
|
} |
|
|
|
} |
|
|
|
|