Commit a52fbe51 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  h264: check that an IDR NAL only contains I slices
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 2510e820 8b2e5e42
...@@ -3486,6 +3486,12 @@ static int decode_slice_header(H264Context *h, H264Context *h0) ...@@ -3486,6 +3486,12 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
h->slice_type = slice_type; h->slice_type = slice_type;
h->slice_type_nos = slice_type & 3; 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 // to make a few old functions happy, it's wrong though
h->pict_type = h->slice_type; h->pict_type = h->slice_type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment