aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-18 18:46:05 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-18 19:10:57 +0100
commit36cf247e4302afcb09e995ad1c594d97897d17ba (patch)
tree6ef65d80b02d40775cb10f138f76cfe69295ec6f
parent9f02d4ed0f72c017dba6fb71d5997c632aa52c08 (diff)
downloadffmpeg-36cf247e4302afcb09e995ad1c594d97897d17ba.tar.gz
ff_h264_direct_ref_list_init: fix B slice check.
Fixes null pointer dereference. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/h264_direct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c
index ce395a3c56..9ef5862472 100644
--- a/libavcodec/h264_direct.c
+++ b/libavcodec/h264_direct.c
@@ -131,7 +131,7 @@ void ff_h264_direct_ref_list_init(H264Context * const h){
h->col_fieldoff = 2 * h->ref_list[1][0].f.reference - 3;
}
- if (cur->f.pict_type != AV_PICTURE_TYPE_B || h->direct_spatial_mv_pred)
+ if (h->slice_type_nos != AV_PICTURE_TYPE_B || h->direct_spatial_mv_pred)
return;
for(list=0; list<2; list++){