diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-31 01:57:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-31 01:57:00 +0200 |
commit | a38758a97efe9c2de48b5429fd2fdebd55ba6a64 (patch) | |
tree | 8c47776fe5f11380147d8ea8b24a9688f1d32a63 | |
parent | a105931d3edfd47f287e47e858ef080f0199cd47 (diff) | |
download | ffmpeg-a38758a97efe9c2de48b5429fd2fdebd55ba6a64.tar.gz |
avcodec/h264_refs: fix null pointer dereference with -DTRACE
Found-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264_refs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 27619d994c..3519870046 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -175,16 +175,16 @@ int ff_h264_fill_default_ref_list(H264Context *h, H264SliceContext *sl) #ifdef TRACE for (i = 0; i < sl->ref_count[0]; i++) { tprintf(h->avctx, "List0: %s fn:%d 0x%p\n", - (h->default_ref_list[0][i].parent->long_ref ? "LT" : "ST"), + h->default_ref_list[0][i].parent ? (h->default_ref_list[0][i].parent->long_ref ? "LT" : "ST") : "NULL", h->default_ref_list[0][i].pic_id, - h->default_ref_list[0][i].parent->f.data[0]); + h->default_ref_list[0][i].parent ? h->default_ref_list[0][i].parent->f.data[0] : 0); } if (sl->slice_type_nos == AV_PICTURE_TYPE_B) { for (i = 0; i < sl->ref_count[1]; i++) { tprintf(h->avctx, "List1: %s fn:%d 0x%p\n", - (h->default_ref_list[1][i].parent->long_ref ? "LT" : "ST"), + h->default_ref_list[1][i].parent ? (h->default_ref_list[1][i].parent->long_ref ? "LT" : "ST") : "NULL", h->default_ref_list[1][i].pic_id, - h->default_ref_list[1][i].parent->f.data[0]); + h->default_ref_list[1][i].parent ? h->default_ref_list[1][i].parent->f.data[0] : 0); } } #endif |