diff options
author | Jerome Borsboom <jerome.borsboom@carpalis.nl> | 2018-02-25 22:13:46 +0300 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2018-03-05 01:17:33 +0300 |
commit | 0ec7eb930520b21b9cda34809378b0a8ca3a46e2 (patch) | |
tree | 5098c34954b9bfe3928f923656260e35ef28a905 /libavcodec/vaapi_vc1.c | |
parent | 883bdc5fb7c4f579eba1c10e01487b08601ec0be (diff) |
avcodec/vaapi: mask unused bits in bitplane_present.value
Due to the union construct, unused bits in bitplane_present.value might
be uninitialized even when the used bits are all set to a value.
Masking the unused bits prevents spurious true values when all used
bits are unset, e.g. skipped pictures.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
Diffstat (limited to 'libavcodec/vaapi_vc1.c')
-rw-r--r-- | libavcodec/vaapi_vc1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c index 97b23917f6..74ba783141 100644 --- a/libavcodec/vaapi_vc1.c +++ b/libavcodec/vaapi_vc1.c @@ -383,7 +383,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t if (err) goto fail; - if (pic_param.bitplane_present.value) { + if (pic_param.bitplane_present.value & 0x7f) { uint8_t *bitplane; const uint8_t *ff_bp[3]; int x, y, n; |