[vlc-devel] [vlc-commits] auhal: remove misleading error check since TPCircularBufferProduceBytes' return value is void
david.fuhrmann at gmail.com
Thu Apr 4 19:45:34 CEST 2013
Am 04.04.2013 um 19:21 schrieb Felix Paul Kühne <fkuehne.videolan at gmail.com>:
> On 01.04.2013, at 22:17, David Fuhrmann <david.fuhrmann at gmail.com> wrote:
>> Am 01.04.2013 um 18:13 schrieb Felix Paul Kühne <git at videolan.org>:
>>> vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Apr 1 18:12:52 2013 +0200| [cf0fafe62916749297497dce5d87a8daf1b87d54] | committer: Felix Paul Kühne
>>> auhal: remove misleading error check since TPCircularBufferProduceBytes' return value is void
>> Do you have another version of the circular buffer implementation?
>> TPCircularBuffer.h line 157 states that return value is bool, with false if buffer is full. Thats why I added this error check.
> Sorry, I mixed up TPCircularBufferProduceBytes and TPCircularBufferProduce.
> However, the check was still wrong, since TPCircularBufferProduceBytes returns "true if bytes copied, false if there was insufficient space". Thus, every time a buffer was copied, the "meh, we dropped something" message appeared.
No. I checked for return value == 0, and assuming that 0 means false, this should be right in the first place. ;-)
More information about the vlc-devel