Skip to content
Snippets Groups Projects
Commit 36cf247e authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 9f02d4ed
No related branches found
No related tags found
No related merge requests found
...@@ -131,7 +131,7 @@ void ff_h264_direct_ref_list_init(H264Context * const h){ ...@@ -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; 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; return;
for(list=0; list<2; list++){ for(list=0; list<2; list++){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment