mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-02-06 18:00:17 +00:00
lavc/svq3: Fix regression decoding some files.
Fixes some SVQ3 encoded files which fail to decode correctly after6d6faa2a2d. These files exhibit lots of artifacts and logs show "Media key encryption is not implemented". However they decode without artifacts before6d6faa2a2d. The attatched patch allows these files to successfully decode, but also reject media key files. Tested on the files in #6094 and http://samples.mplayerhq.hu/V-codecs/SVQ3/Vertical400kbit.sorenson3.mov Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit5aeb3b0080) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1e1c02c51b
commit
e2d052d5c8
1 changed files with 4 additions and 5 deletions
|
|
@ -1065,16 +1065,15 @@ static int svq3_decode_slice_header(AVCodecContext *avctx)
|
|||
av_log(s->avctx, AV_LOG_ERROR, "illegal slice type %u \n", slice_id);
|
||||
return -1;
|
||||
}
|
||||
if (get_bits1(&s->gb_slice)) {
|
||||
avpriv_report_missing_feature(s->avctx, "Media key encryption");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
s->slice_type = ff_h264_golomb_to_pict_type[slice_id];
|
||||
|
||||
if ((header & 0x9F) == 2) {
|
||||
i = (s->mb_num < 64) ? 5 : av_log2(s->mb_num - 1);
|
||||
i = (s->mb_num < 64) ? 6 : (1 + av_log2(s->mb_num - 1));
|
||||
get_bits(&s->gb_slice, i);
|
||||
} else if (get_bits1(&s->gb_slice)) {
|
||||
avpriv_report_missing_feature(s->avctx, "Media key encryption");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
s->slice_num = get_bits(&s->gb_slice, 8);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue