summaryrefslogtreecommitdiff
path: root/libavcodec/cbs_vp9.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-06-20 01:45:11 +0200
committerMark Thompson <sw@jkqxz.net>2019-07-27 22:00:43 +0100
commitb71a0367a6e763d631b8dcd608f98d42c05fa57c (patch)
treebe3fec3ada6650ef0696a1fe48df7d50a47dc964 /libavcodec/cbs_vp9.c
parentc2a91645c5b5cd6ed32089ec79cbb667326a8d8a (diff)
cbs: Remove useless initializations
Up until now, a temporary variable was used and initialized every time a value was read in CBS; if reading turned out to be successfull, this value was overwritten (without having ever been looked at) with the value read if reading was successfull; on failure the variable wasn't touched either. Therefore these initializations can be and have been removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/cbs_vp9.c')
-rw-r--r--libavcodec/cbs_vp9.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/cbs_vp9.c b/libavcodec/cbs_vp9.c
index 5579d9b0af..7102bb87d3 100644
--- a/libavcodec/cbs_vp9.c
+++ b/libavcodec/cbs_vp9.c
@@ -267,14 +267,14 @@ static int cbs_vp9_write_le(CodedBitstreamContext *ctx, PutBitContext *pbc,
#define RWContext GetBitContext
#define xf(width, name, var, subs, ...) do { \
- uint32_t value = 0; \
+ uint32_t value; \
CHECK(ff_cbs_read_unsigned(ctx, rw, width, #name, \
SUBSCRIPTS(subs, __VA_ARGS__), \
&value, 0, (1 << width) - 1)); \
var = value; \
} while (0)
#define xs(width, name, var, subs, ...) do { \
- int32_t value = 0; \
+ int32_t value; \
CHECK(cbs_vp9_read_s(ctx, rw, width, #name, \
SUBSCRIPTS(subs, __VA_ARGS__), &value)); \
var = value; \
@@ -282,7 +282,7 @@ static int cbs_vp9_write_le(CodedBitstreamContext *ctx, PutBitContext *pbc,
#define increment(name, min, max) do { \
- uint32_t value = 0; \
+ uint32_t value; \
CHECK(cbs_vp9_read_increment(ctx, rw, min, max, #name, &value)); \
current->name = value; \
} while (0)
@@ -315,7 +315,7 @@ static int cbs_vp9_write_le(CodedBitstreamContext *ctx, PutBitContext *pbc,
} while (0)
#define fixed(width, name, value) do { \
- av_unused uint32_t fixed_value = value; \
+ av_unused uint32_t fixed_value; \
CHECK(ff_cbs_read_unsigned(ctx, rw, width, #name, \
0, &fixed_value, value, value)); \
} while (0)