summaryrefslogtreecommitdiff
path: root/libavcodec/svq3.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2017-01-23 13:39:56 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2017-01-24 23:40:13 +0100
commit6d6faa2a2ded9cc203a9f2d8dcceebbda27a12a4 (patch)
tree8b54b765cd25aabe851f20c5d1fe3646254c33c5 /libavcodec/svq3.c
parent9e6a2427558a718be0c1fffacffd935f630a7a8d (diff)
downloadffmpeg-6d6faa2a2ded9cc203a9f2d8dcceebbda27a12a4.tar.gz
lavc/svq3: Fail for media key encryption.
Tested-by: ami_stuff Fixes a part of ticket #6094.
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r--libavcodec/svq3.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index e0747d5884..5b996561f1 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -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);
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) ? 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);
- } else {
- skip_bits1(&s->gb_slice);
}
s->slice_num = get_bits(&s->gb_slice, 8);