aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-18 18:46:05 +0100
committerJanne Grunau <janne-libav@jannau.net>2012-12-18 19:44:22 +0100
commited2d7d5868a4a5d914f1e5488d63ea696a3b2937 (patch)
tree32dd674ca7b0f568e7471e4da8ade79eb2d7cec0 /libavcodec
parent73ad2c2fa725be51215e1c021c5335f8ce65af79 (diff)
downloadffmpeg-ed2d7d5868a4a5d914f1e5488d63ea696a3b2937.tar.gz
ff_h264_direct_ref_list_init: fix B slice check.
Fixes null pointer dereference. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Diffstat (limited to 'libavcodec')
-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 a33efa5d6f..bf444958bf 100644
--- a/libavcodec/h264_direct.c
+++ b/libavcodec/h264_direct.c
@@ -134,7 +134,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++){