Commit 2fa98a89 authored by astrange's avatar astrange

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.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19328 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent cf06fd2c
......@@ -7603,9 +7603,12 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment