diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-12 15:10:10 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-16 03:06:46 +0100 |
commit | 7a5f7caee9ebd58a025bd804e89f33de9f217b2a (patch) | |
tree | d112260c98252d456da1a6ce593f28dd5f50bdae /libavcodec | |
parent | 8ff3fbf6bca0ee897e458fc27e5f967cdcbc16c7 (diff) | |
download | ffmpeg-7a5f7caee9ebd58a025bd804e89f33de9f217b2a.tar.gz |
avcodec/speedhq: Replace always-true check by assert
Should fix Coverity tickets #1473572 and #1473504.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/speedhq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c index 91ba80ebd3..743dacc6ce 100644 --- a/libavcodec/speedhq.c +++ b/libavcodec/speedhq.c @@ -295,7 +295,8 @@ static int decode_speedhq_border(const SHQContext *s, GetBitContext *gb, AVFrame if (s->subsampling == SHQ_SUBSAMPLING_420) { dest_cb = frame->data[1] + frame->linesize[1] * (y/2 + field_number) + x / 2; dest_cr = frame->data[2] + frame->linesize[2] * (y/2 + field_number) + x / 2; - } else if (s->subsampling == SHQ_SUBSAMPLING_422) { + } else { + av_assert2(s->subsampling == SHQ_SUBSAMPLING_422); dest_cb = frame->data[1] + frame->linesize[1] * (y + field_number) + x / 2; dest_cr = frame->data[2] + frame->linesize[2] * (y + field_number) + x / 2; } |