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

Christopher Mueller git at videolan.org
Tue Mar 6 11:14:24 CET 2012


vlc | branch: master | Christopher Mueller <christopher.mueller at itec.aau.at> | Tue Mar  6 08:30:05 2012 +0100| [ff5a7721ddbe528232d97e85eb64e226d3d8794d] | committer: Hugo Beauzée-Luyssen

dash: read skips bytes when p_read is NULL

Signed-off-by: Hugo Beauzée-Luyssen <beauze.h at gmail.com>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ff5a7721ddbe528232d97e85eb64e226d3d8794d
---

 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();
 



More information about the vlc-commits mailing list