Browse Source

lavc/svq3: Fail for media key encryption.

Tested-by: ami_stuff

Fixes a part of ticket #6094.
tags/n3.3
Carl Eugen Hoyos 8 years ago
parent
commit
6d6faa2a2d
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      libavcodec/svq3.c

+ 5
- 3
libavcodec/svq3.c View File

@@ -1070,14 +1070,16 @@ static int svq3_decode_slice_header(AVCodecContext *avctx)
av_log(s->avctx, AV_LOG_ERROR, "illegal slice type %u \n", slice_id); av_log(s->avctx, AV_LOG_ERROR, "illegal slice type %u \n", slice_id);
return -1; 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]; s->slice_type = ff_h264_golomb_to_pict_type[slice_id];


if ((header & 0x9F) == 2) { if ((header & 0x9F) == 2) {
i = (s->mb_num < 64) ? 6 : (1 + av_log2(s->mb_num - 1));
i = (s->mb_num < 64) ? 5 : av_log2(s->mb_num - 1);
get_bits(&s->gb_slice, i); get_bits(&s->gb_slice, i);
} else {
skip_bits1(&s->gb_slice);
} }


s->slice_num = get_bits(&s->gb_slice, 8); s->slice_num = get_bits(&s->gb_slice, 8);


Loading…
Cancel
Save