diff options
author | Julian Scheel <julian@jusst.de> | 2010-06-12 12:36:56 +0200 |
---|---|---|
committer | Julian Scheel <julian@jusst.de> | 2010-06-12 12:36:56 +0200 |
commit | 977a841299e853db68fda0386b4c4aeebd52a376 (patch) | |
tree | 7d23553bb9602f8c5287b40a8531f6f1484519cc /src | |
parent | d4db3fd962138805227e55cfa16fefe5323b63de (diff) | |
download | xine-lib-977a841299e853db68fda0386b4c4aeebd52a376.tar.gz xine-lib-977a841299e853db68fda0386b4c4aeebd52a376.tar.bz2 |
fix possible segfault in broken streams
Diffstat (limited to 'src')
-rw-r--r-- | src/video_dec/libvdpau/dpb.c | 2 | ||||
-rw-r--r-- | src/video_dec/libvdpau/vdpau_h264.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/video_dec/libvdpau/dpb.c b/src/video_dec/libvdpau/dpb.c index eb1de90a9..1a506fef0 100644 --- a/src/video_dec/libvdpau/dpb.c +++ b/src/video_dec/libvdpau/dpb.c @@ -57,7 +57,7 @@ int dp_top_field_first(struct decoded_picture *decoded_pic) } } - if (decoded_pic->coded_pic[0]->flag_mask & PIC_STRUCT_PRESENT) { + if (decoded_pic->coded_pic[0]->flag_mask & PIC_STRUCT_PRESENT && decoded_pic->coded_pic[0]->sei_nal != NULL) { uint8_t pic_struct = decoded_pic->coded_pic[0]->sei_nal->sei.pic_timing.pic_struct; if(pic_struct == DISP_TOP_BOTTOM || pic_struct == DISP_TOP_BOTTOM_TOP) { diff --git a/src/video_dec/libvdpau/vdpau_h264.c b/src/video_dec/libvdpau/vdpau_h264.c index 72ee39868..1bfe5bcc6 100644 --- a/src/video_dec/libvdpau/vdpau_h264.c +++ b/src/video_dec/libvdpau/vdpau_h264.c @@ -292,7 +292,7 @@ static void fill_vdpau_pictureinfo_h264(video_decoder_t *this_gen, uint32_t slic int check_progressive(struct coded_picture *pic) { - if (pic->flag_mask & PIC_STRUCT_PRESENT) { + if (pic->flag_mask & PIC_STRUCT_PRESENT && pic->sei_nal != NULL) { uint8_t pic_struct = pic->sei_nal->sei.pic_timing.pic_struct; if (pic_struct == DISP_FRAME) { |