Commit e0237208 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/h264: Do not get stuck on IDR inter frames

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8c63a0d1
......@@ -1567,6 +1567,12 @@ again:
switch (hx->nal_unit_type) {
case NAL_IDR_SLICE:
if ((ptr[0] & 0xFC) == 0x98) {
av_log(h->avctx, AV_LOG_ERROR, "Invalid inter IDR frame\n");
h->next_outputed_poc = INT_MIN;
ret = -1;
goto end;
}
if (h->nal_unit_type != NAL_IDR_SLICE) {
av_log(h->avctx, AV_LOG_ERROR,
"Invalid mix of idr and non-idr slices\n");
......
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