comparison vc1dec.c @ 10369:71a38fce15bc libavcodec

Since some junk may be or may be not present before actual VC-1 extradata, search for real extradata start instead of always skipping one byte. Patch by Andrew Dennison gmailify(${name}d, lists) Thread: [PATCH] Fix VC1 "Incomplete extradata" for mkv files generated by eac3to
author kostya
date Tue, 06 Oct 2009 15:30:08 +0000
parents 48aebab3bac1
children d4d925400ba2
comparison
equal deleted inserted replaced
10368:59ec306245a4 10369:71a38fce15bc
3037 av_log(avctx, AV_LOG_ERROR, "Extradata size too small: %i\n", avctx->extradata_size); 3037 av_log(avctx, AV_LOG_ERROR, "Extradata size too small: %i\n", avctx->extradata_size);
3038 return -1; 3038 return -1;
3039 } 3039 }
3040 3040
3041 buf2 = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); 3041 buf2 = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
3042 if(start[0]) start++; // in WVC1 extradata first byte is its size 3042 start = find_next_marker(start, end); // in WVC1 extradata first byte is its size, but can be 0 in mkv
3043 next = start; 3043 next = start;
3044 for(; next < end; start = next){ 3044 for(; next < end; start = next){
3045 next = find_next_marker(start + 4, end); 3045 next = find_next_marker(start + 4, end);
3046 size = next - start - 4; 3046 size = next - start - 4;
3047 if(size <= 0) continue; 3047 if(size <= 0) continue;