summaryrefslogtreecommitdiff
path: root/libavcodec/h261dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-17 10:30:38 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-17 10:35:51 +0200
commitbd71071066602a9aa542286829f33eddc9bec615 (patch)
tree33f0086902fd986e1152518bf38c700f0ca5a9b7 /libavcodec/h261dec.c
parent2c1a215ddb8bfa07f33b28ac6e7c587fac6448c2 (diff)
parentc59967fa7cc5bc2fa06b36c17d2c207240c06b3e (diff)
Merge commit 'c59967fa7cc5bc2fa06b36c17d2c207240c06b3e'
* commit 'c59967fa7cc5bc2fa06b36c17d2c207240c06b3e': h261: check the mtype index Conflicts: libavcodec/h261dec.c The right half of the check is impossible to be true and thus replaced by an assert() See: ec3cd74f2dab8e3e8234ccb994132b23d3098585 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h261dec.c')
-rw-r--r--libavcodec/h261dec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index b6303444d9..72b3b0991f 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -378,9 +378,11 @@ static int h261_decode_mb(H261Context *h)
// Read mtype
h->mtype = get_vlc2(&s->gb, h261_mtype_vlc.table, H261_MTYPE_VLC_BITS, 2);
if (h->mtype < 0) {
- av_log(s->avctx, AV_LOG_ERROR, "illegal mtype %d\n", h->mtype);
+ av_log(s->avctx, AV_LOG_ERROR, "Invalid mtype index %d\n",
+ h->mtype);
return SLICE_ERROR;
}
+ av_assert0(h->mtype < FF_ARRAY_ELEMS(ff_h261_mtype_map));
h->mtype = ff_h261_mtype_map[h->mtype];
// Read mquant