diff options
author | Reinhard Nißl <rnissl@gmx.de> | 2010-07-29 23:26:59 +0200 |
---|---|---|
committer | Reinhard Nißl <rnissl@gmx.de> | 2010-07-29 23:26:59 +0200 |
commit | e9aaf9f1fb33de4222ae1eb35d28789f03a0ed2b (patch) | |
tree | 2955610713210e8c1dbc358affbbd69159af10ce /src | |
parent | 9a6e4bd01cdde4ef55afdda47c4d8b34f42e767b (diff) | |
download | xine-lib-e9aaf9f1fb33de4222ae1eb35d28789f03a0ed2b.tar.gz xine-lib-e9aaf9f1fb33de4222ae1eb35d28789f03a0ed2b.tar.bz2 |
Fix NULL pointer access when starting decoding anywhere in the stream.
The referenced last_vcl_nal exists only when decoding starts at an IDR frame.
Starting anywhere else may lead to a NULL pointer access.
Diffstat (limited to 'src')
-rw-r--r-- | src/video_dec/libvdpau/h264_parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_dec/libvdpau/h264_parser.c b/src/video_dec/libvdpau/h264_parser.c index 4794b5b9e..81621f070 100644 --- a/src/video_dec/libvdpau/h264_parser.c +++ b/src/video_dec/libvdpau/h264_parser.c @@ -375,7 +375,7 @@ void calculate_pic_order(struct h264_parser *parser, struct coded_picture *pic, pic->top_field_order_cnt = parser->prev_top_field_order_cnt; } else if (sps->pic_order_cnt_type == 2) { - uint32_t prev_frame_num = parser->last_vcl_nal->slc.frame_num; + uint32_t prev_frame_num = parser->last_vcl_nal ? parser->last_vcl_nal->slc.frame_num : 0; uint32_t prev_frame_num_offset = parser->frame_num_offset; uint32_t temp_pic_order_cnt = 0; |