diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-10-06 21:55:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-07 00:57:05 +0200 |
commit | 5ec55d216ef05ceb877a158c7d65e072df8b71f9 (patch) | |
tree | b99ac9171aa511041096ff28b29c2b7e0cc3860d /libavcodec/h264.c | |
parent | 9bf4371e1bbd981a2a6bf2aaf754ec0684f2ae7d (diff) | |
download | ffmpeg-5ec55d216ef05ceb877a158c7d65e072df8b71f9.tar.gz |
h264: reject unsupported 422 9 bit streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index fb3099a5fd..197064faef 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2648,7 +2648,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ if (s->avctx->bits_per_raw_sample != h->sps.bit_depth_luma || h->cur_chroma_format_idc != h->sps.chroma_format_idc) { - if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) { + if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10 && + (h->sps.bit_depth_luma != 9 || !CHROMA422)) { s->avctx->bits_per_raw_sample = h->sps.bit_depth_luma; h->cur_chroma_format_idc = h->sps.chroma_format_idc; h->pixel_shift = h->sps.bit_depth_luma > 8; @@ -2658,7 +2659,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ s->dsp.dct_bits = h->sps.bit_depth_luma > 8 ? 32 : 16; dsputil_init(&s->dsp, s->avctx); } else { - av_log(s->avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma); + av_log(s->avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d chroma_idc: %d\n", + h->sps.bit_depth_luma, h->sps.chroma_format_idc); return -1; } } |