aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-08-07 18:49:08 +0200
committerPaul B Mahol <onemda@gmail.com>2019-08-28 16:31:00 +0200
commitef73ccc2c419a326ca87ef6573abe70a32e616c1 (patch)
tree42f3d4a33dcc75e74d84a962a8241d9475f1f1c7
parent428b4aacb1a91a267650de644519882a5f700388 (diff)
downloadffmpeg-ef73ccc2c419a326ca87ef6573abe70a32e616c1.tar.gz
avcodec/h264_refs: do not use invalid mmco values in case of error
Change one relevant assert to av_assert0 while here.
-rw-r--r--libavcodec/h264_refs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 74087ff266..dae8bd278a 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -732,7 +732,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h)
for (j = 0; j < MAX_DELAYED_PIC_COUNT; j++)
h->last_pocs[j] = INT_MIN;
break;
- default: assert(0);
+ default: av_assert0(0);
}
}
@@ -868,6 +868,7 @@ int ff_h264_decode_ref_pic_marking(H264SliceContext *sl, GetBitContext *gb,
av_log(logctx, AV_LOG_ERROR,
"illegal long ref in memory management control "
"operation %d\n", opcode);
+ sl->nb_mmco = i;
return -1;
}
mmco[i].long_arg = long_arg;
@@ -877,6 +878,7 @@ int ff_h264_decode_ref_pic_marking(H264SliceContext *sl, GetBitContext *gb,
av_log(logctx, AV_LOG_ERROR,
"illegal memory management control operation %d\n",
opcode);
+ sl->nb_mmco = i;
return -1;
}
if (opcode == MMCO_END)