[vlc-devel] [PATCH] dash: read skips bytes when p_read is NULL

Christopher at mailsrv.uni-klu.ac.at Christopher at mailsrv.uni-klu.ac.at
Tue Mar 6 08:30:05 CET 2012


From: Christopher Mueller <christopher.mueller at itec.aau.at>

---
 modules/stream_filter/dash/buffer/BlockBuffer.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/modules/stream_filter/dash/buffer/BlockBuffer.cpp b/modules/stream_filter/dash/buffer/BlockBuffer.cpp
index 2b10358..056c481 100644
--- a/modules/stream_filter/dash/buffer/BlockBuffer.cpp
+++ b/modules/stream_filter/dash/buffer/BlockBuffer.cpp
@@ -103,7 +103,11 @@ int     BlockBuffer::get                  (void *p_data, unsigned int len)
 
     this->reduceBufferMilliSec(ret);
 
-    block_GetBytes(&this->buffer, (uint8_t *)p_data, ret);
+    if(p_data == NULL)
+        block_SkipBytes(&this->buffer, ret);
+    else
+        block_GetBytes(&this->buffer, (uint8_t *)p_data, ret);
+
     block_BytestreamFlush(&this->buffer);
     this->notify();
 
-- 
1.7.0.4




More information about the vlc-devel mailing list