Skip to content

Commit

Permalink
svq3: Check for any negative return value from ff_h264_check_intra_pr…
Browse files Browse the repository at this point in the history
…ed_mode

Also pass on any returned error code.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: [email protected]
Signed-off-by: Martin Storsjö <[email protected]>
  • Loading branch information
mstorsjo committed Sep 17, 2013
1 parent f8d1bb6 commit 1115689
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libavcodec/svq3.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,9 @@ static int svq3_decode_mb(SVQ3Context *s, unsigned int mb_type)
dir = i_mb_type_info[mb_type - 8].pred_mode;
dir = (dir >> 1) ^ 3 * (dir & 1) ^ 1;

if ((h->intra16x16_pred_mode = ff_h264_check_intra_pred_mode(h, dir, 0)) == -1) {
av_log(h->avctx, AV_LOG_ERROR, "check_intra_pred_mode = -1\n");
return -1;
if ((h->intra16x16_pred_mode = ff_h264_check_intra_pred_mode(h, dir, 0)) < 0) {
av_log(h->avctx, AV_LOG_ERROR, "ff_h264_check_intra_pred_mode < 0\n");
return h->intra16x16_pred_mode;
}

cbp = i_mb_type_info[mb_type - 8].cbp;
Expand Down

0 comments on commit 1115689

Please sign in to comment.