comparison h264.c @ 9910:d07aee233d03 libavcodec

H.264: Don't set data_partitioning for invalid NAL_DPA. Before, the decoder could interpret a corrupt frame as a NAL_DPA and NAL_DPC, and then start decoding even if decode_slice_header() returned an error. This frequently caused crashes. Fixes issue1228, issue1229, and partially issue1238.
author astrange
date Fri, 03 Jul 2009 05:52:00 +0000
parents 003d7f830e2a
children 14edbbff0f25
comparison
equal deleted inserted replaced
9909:30dad2d5e7fe 9910:d07aee233d03
7601 break; 7601 break;
7602 case NAL_DPA: 7602 case NAL_DPA:
7603 init_get_bits(&hx->s.gb, ptr, bit_length); 7603 init_get_bits(&hx->s.gb, ptr, bit_length);
7604 hx->intra_gb_ptr= 7604 hx->intra_gb_ptr=
7605 hx->inter_gb_ptr= NULL; 7605 hx->inter_gb_ptr= NULL;
7606
7607 if ((err = decode_slice_header(hx, h)) < 0)
7608 break;
7609
7606 hx->s.data_partitioning = 1; 7610 hx->s.data_partitioning = 1;
7607 7611
7608 err = decode_slice_header(hx, h);
7609 break; 7612 break;
7610 case NAL_DPB: 7613 case NAL_DPB:
7611 init_get_bits(&hx->intra_gb, ptr, bit_length); 7614 init_get_bits(&hx->intra_gb, ptr, bit_length);
7612 hx->intra_gb_ptr= &hx->intra_gb; 7615 hx->intra_gb_ptr= &hx->intra_gb;
7613 break; 7616 break;