8770453c09
If size is 0 after popping data from the front or back, set the start/end points to 0 as well to ensure that any subsequent buffer pushes start from the beginning of the buffer rather than the middle of the buffer. Reduces potential unnecessary operations in that case. Additionally, this fixes a bug with circulebuf_pop_back where if start position was 0, and all the data was popped off the buffer (equal to the capacity), the end position would be equal to the original size. As an example to replicate the bug, push 5, pop 5, then push 10. The start/end points will be invalid. Closes jp9000/obs-studio#954