# HG changeset patch # User astrange # Date 1246600320 0 # Node ID d07aee233d0346fd5fb0aba9dda2d05427b6e3e6 # Parent 30dad2d5e7fe2b36fd3585f6fd67eb2b0b14a4e4 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. diff -r 30dad2d5e7fe -r d07aee233d03 h264.c --- a/h264.c Thu Jul 02 13:13:20 2009 +0000 +++ b/h264.c Fri Jul 03 05:52:00 2009 +0000 @@ -7603,9 +7603,12 @@ init_get_bits(&hx->s.gb, ptr, bit_length); hx->intra_gb_ptr= hx->inter_gb_ptr= NULL; + + if ((err = decode_slice_header(hx, h)) < 0) + break; + hx->s.data_partitioning = 1; - err = decode_slice_header(hx, h); break; case NAL_DPB: init_get_bits(&hx->intra_gb, ptr, bit_length);