diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-17 03:16:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-17 04:05:01 +0200 |
commit | 052ab208059ccb30e6bb73866995ef1aabf2feb6 (patch) | |
tree | d9e0c6604c6872b72546e82a9984face5730e55e | |
parent | 89f86379797830870c5d499c0add1e1c9de9b70a (diff) | |
download | ffmpeg-052ab208059ccb30e6bb73866995ef1aabf2feb6.tar.gz |
ffmpeg: fix regression with jpeg pix fmts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | ffmpeg.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -704,9 +704,17 @@ static const enum PixelFormat *choose_pixel_fmts(OutputStream *ost) if (ost->st->codec->pix_fmt != PIX_FMT_NONE) { ost->pix_fmts[0] = choose_pixel_fmt(ost->st, ost->enc, ost->st->codec->pix_fmt); return ost->pix_fmts; - } else if (ost->enc->pix_fmts) + } else if (ost->enc->pix_fmts) { + if (ost->st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) { + if (ost->st->codec->codec_id == CODEC_ID_MJPEG) { + return (const enum PixelFormat[]) { PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE }; + } else if (ost->st->codec->codec_id == CODEC_ID_LJPEG) { + return (const enum PixelFormat[]) { PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P, PIX_FMT_YUV420P, + PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_BGRA, PIX_FMT_NONE }; + } + } return ost->enc->pix_fmts; - else + } else return NULL; } |