diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-04-23 09:41:49 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-04-23 09:41:49 +0200 |
commit | 2a246bafc1412c5372c574aa3eab61073bc86bc2 (patch) | |
tree | 604b4bd420db2fb5719c7c396570a1c7ecfb04e6 /vlc_input.c | |
parent | b98f270b28eff320f8c97e074944867121b8d858 (diff) | |
download | toolame-dab-2a246bafc1412c5372c574aa3eab61073bc86bc2.tar.gz toolame-dab-2a246bafc1412c5372c574aa3eab61073bc86bc2.tar.bz2 toolame-dab-2a246bafc1412c5372c574aa3eab61073bc86bc2.zip |
Add some asserts in vlc_input
Diffstat (limited to 'vlc_input.c')
-rw-r--r-- | vlc_input.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vlc_input.c b/vlc_input.c index 8233148..8cdcf4a 100644 --- a/vlc_input.c +++ b/vlc_input.c @@ -171,6 +171,12 @@ int vlc_in_prepare( ssize_t vlc_in_read(void *buf, size_t len) { + if (len == 0) { + return 0; + } + + assert(buf); + size_t requested = len; for (;;) { pthread_mutex_lock(&buffer_lock); @@ -199,6 +205,7 @@ ssize_t vlc_in_read(void *buf, size_t len) if (len > 0) { assert(len < head_buffer->size); + assert(head_buffer->buf); memcpy(buf, head_buffer->buf, len); |