summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video_dec/libvdpau/h264_parser.c2
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;