[FFmpeg-cvslog] h264_direct: assert the validity of the spatial ref

Michael Niedermayer git at videolan.org
Sat Mar 30 22:25:19 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Mar 30 20:57:40 2013 +0100| [3d68f5e032c845467e107a19393b270f82034eac] | committer: Michael Niedermayer

h264_direct: assert the validity of the spatial ref

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3d68f5e032c845467e107a19393b270f82034eac
---

 libavcodec/h264_direct.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c
index 2f49d0a..2d93c2a 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;



More information about the ffmpeg-cvslog mailing list