OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ffb059
)
escape124: explicitly set get_bits1 variable
author
Vittorio Giovara
<vittorio.giovara@gmail.com>
Tue, 11 Nov 2014 16:40:09 +0000
(17:40 +0100)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Thu, 13 Nov 2014 00:41:26 +0000
(
01:41
+0100)
Makes coverity less confused.
CC: libav-stable@libav.org
Bug-Id: CID
1203487
libavcodec/escape124.c
patch
|
blob
|
history
diff --git
a/libavcodec/escape124.c
b/libavcodec/escape124.c
index
30f22e0
..
6c4654c
100644
(file)
--- 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;