bitwriter: Fix the trailing bits lost when getting its data.
authorHe Junyan <junyan.he@intel.com>
Sat, 18 Sep 2021 16:19:43 +0000 (00:19 +0800)
committerHe Junyan <junyan.he@intel.com>
Sun, 19 Sep 2021 12:41:59 +0000 (20:41 +0800)
commit81cf9754e3c29148fd7a867241a87e2ac72e398b
tree6087a6d2efd2524d54d2bea1fcad002b31e498e7
parentc6acee201e69295c6e563806633002393682989f
bitwriter: Fix the trailing bits lost when getting its data.

In reset_and_get_data and reset_and_get_buffer, it fails to include
the trailing bits less than 8. So, when the bit_size is not byte
aligned, the trailing bits are lost in the return buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/886>
libs/gst/base/gstbitwriter.c