Commit ec7d002e authored by Martin Storsjö's avatar Martin Storsjö

vc1, mss2: Check for any negative return value from ff_vc1_parse_frame_header

This is required if we return other error codes than explicitly
-1, which so far has been the only other possible return value
besides 0.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent ccb148e4
......@@ -388,7 +388,7 @@ static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size,
s->loop_filter = avctx->skip_loop_filter < AVDISCARD_ALL;
if (ff_vc1_parse_frame_header(v, &s->gb) == -1) {
if (ff_vc1_parse_frame_header(v, &s->gb) < 0) {
av_log(v->s.avctx, AV_LOG_ERROR, "header error\n");
return AVERROR_INVALIDDATA;
}
......
......@@ -5464,11 +5464,11 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
// do parse frame header
v->pic_header_flag = 0;
if (v->profile < PROFILE_ADVANCED) {
if (ff_vc1_parse_frame_header(v, &s->gb) == -1) {
if (ff_vc1_parse_frame_header(v, &s->gb) < 0) {
goto err;
}
} else {
if (ff_vc1_parse_frame_header_adv(v, &s->gb) == -1) {
if (ff_vc1_parse_frame_header_adv(v, &s->gb) < 0) {
goto err;
}
}
......
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