summaryrefslogtreecommitdiff
path: root/libavcodec/h264_direct.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-30 20:57:40 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-30 21:13:19 +0100
commit3d68f5e032c845467e107a19393b270f82034eac (patch)
tree0d37e948cc426e914855548d23cedb59fad95a95 /libavcodec/h264_direct.c
parent285c5f683806d59eeb5ebea0b65f14727fdb6c8c (diff)
h264_direct: assert the validity of the spatial ref
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_direct.c')
-rw-r--r--libavcodec/h264_direct.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c
index 2f49d0ae6f..2d93c2ab60 100644
--- a/libavcodec/h264_direct.c
+++ b/libavcodec/h264_direct.c
@@ -209,6 +209,7 @@ static void pred_spatial_direct_motion(H264Context * const h, int *mb_type){
mv[list]= AV_RN32A(C);
}
}
+ av_assert2(ref[list] < (h->ref_count[list] << !!FRAME_MBAFF(h)));
}else{
int mask= ~(MB_TYPE_L0 << (2*list));
mv[list] = 0;