diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-11-11 17:40:09 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-11-13 01:41:26 +0100 |
commit | 1a9c1333b5d70b427c82cb98f383aa2fa9b2b319 (patch) | |
tree | b15c5d03ea5daedc25cfbbde274dde0cfb0c7fa3 /libavcodec | |
parent | 2ffb0598dbdb81c40650952aa9299fa02fa5e834 (diff) | |
download | ffmpeg-1a9c1333b5d70b427c82cb98f383aa2fa9b2b319.tar.gz |
escape124: explicitly set get_bits1 variable
Makes coverity less confused.
CC: libav-stable@libav.org
Bug-Id: CID 1203487
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/escape124.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/escape124.c b/libavcodec/escape124.c index 30f22e0031..6c4654cd35 100644 --- a/libavcodec/escape124.c +++ b/libavcodec/escape124.c @@ -147,10 +147,11 @@ static MacroBlock decode_macroblock(Escape124Context* s, GetBitContext* gb, // This function reads a maximum of 22 bits; the callers // guard this function appropriately unsigned block_index, depth; - - if (get_bits1(gb)) { + int value = get_bits1(gb); + if (value) { static const char transitions[3][2] = { {2, 1}, {0, 2}, {1, 0} }; - *codebook_index = transitions[*codebook_index][get_bits1(gb)]; + value = get_bits1(gb); + *codebook_index = transitions[*codebook_index][value]; } depth = s->codebooks[*codebook_index].depth; |