diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-18 23:07:36 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-18 23:13:33 +0100 |
commit | a52fbe511948b29ddb042e5021c0eb805b8cae6f (patch) | |
tree | 08f9807a322cd2425d9dd1b8988c73d7d3c95018 | |
parent | 2510e820c43c08d1c2ddf5291054c6f93afc1369 (diff) | |
parent | 8b2e5e42bb9d6a59ede5af2e6df4aaf7750d1195 (diff) | |
download | ffmpeg-a52fbe511948b29ddb042e5021c0eb805b8cae6f.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
h264: check that an IDR NAL only contains I slices
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index cde7af98a7..e90f5712a5 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3486,6 +3486,12 @@ static int decode_slice_header(H264Context *h, H264Context *h0) h->slice_type = slice_type; h->slice_type_nos = slice_type & 3; + if (h->nal_unit_type == NAL_IDR_SLICE && + h->slice_type_nos != AV_PICTURE_TYPE_I) { + av_log(h->avctx, AV_LOG_ERROR, "A non-intra slice in an IDR NAL unit.\n"); + return AVERROR_INVALIDDATA; + } + // to make a few old functions happy, it's wrong though h->pict_type = h->slice_type; |