avcodec/cbs_h265: fix writing extension_data bits

We only care about the right most bit.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2020-04-20 15:25:58 -03:00
parent 2a9d623561
commit 38d1815cc6
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ static int FUNC(extension_data)(CodedBitstreamContext *ctx, RWContext *rw,
} }
#else #else
for (k = 0; k < current->bit_length; k++) for (k = 0; k < current->bit_length; k++)
xu(1, extension_data, current->data[k / 8] >> (7 - k % 8), 0, 1, 0); xu(1, extension_data, current->data[k / 8] >> (7 - k % 8) & 1, 0, 1, 0);
#endif #endif
return 0; return 0;
} }