summaryrefslogtreecommitdiff
path: root/libavcodec/h264_ps.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-06 16:28:55 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-06 16:28:55 +0100
commita60abb1ee01ee065fc1ab2a784fefbd5d3c94917 (patch)
tree794a40a9593f67c0e098ca1af0ff81c7791e0552 /libavcodec/h264_ps.c
parent98dcbb47fa5f51b8ebdf312bcee18b4b9900e7b2 (diff)
parentbfd26b7ce6efea594f2b99441d900419df3af638 (diff)
downloadffmpeg-a60abb1ee01ee065fc1ab2a784fefbd5d3c94917.tar.gz
Merge commit 'bfd26b7ce6efea594f2b99441d900419df3af638'
* commit 'bfd26b7ce6efea594f2b99441d900419df3af638': h264: reject mismatching luma/chroma bit depths during sps parsing Conflicts: libavcodec/h264_ps.c See: bdeb61ccc67911cfc5e20c7cfb1312d0501ca90a Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r--libavcodec/h264_ps.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index a06e3dd65b..e278781b55 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -376,7 +376,12 @@ int ff_h264_decode_seq_parameter_set(H264Context *h)
}
sps->bit_depth_luma = get_ue_golomb(&h->gb) + 8;
sps->bit_depth_chroma = get_ue_golomb(&h->gb) + 8;
- if (sps->bit_depth_luma > 14U || sps->bit_depth_chroma > 14U || sps->bit_depth_luma != sps->bit_depth_chroma) {
+ if (sps->bit_depth_chroma != sps->bit_depth_luma) {
+ avpriv_request_sample(h->avctx,
+ "Different chroma and luma bit depth");
+ goto fail;
+ }
+ if (sps->bit_depth_luma > 14U || sps->bit_depth_chroma > 14U) {
av_log(h->avctx, AV_LOG_ERROR, "illegal bit depth value (%d, %d)\n",
sps->bit_depth_luma, sps->bit_depth_chroma);
goto fail;