[vlc-commits] demux: hls: parse chained ID3 tags

Francois Cartegnie git at videolan.org
Fri Sep 16 11:45:34 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Sep 16 11:28:58 2016 +0200| [bc249e813329968d15ef9f674dcd314a1d9c35d0] | committer: Francois Cartegnie

demux: hls: parse chained ID3 tags

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

 modules/demux/hls/HLSStreams.cpp | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/modules/demux/hls/HLSStreams.cpp b/modules/demux/hls/HLSStreams.cpp
index db1cb29..36807ad 100644
--- a/modules/demux/hls/HLSStreams.cpp
+++ b/modules/demux/hls/HLSStreams.cpp
@@ -123,12 +123,16 @@ block_t * HLSStream::checkBlock(block_t *p_block, bool b_first)
     if(b_first && p_block &&
        p_block->i_buffer >= 10 && ID3TAG_IsTag(p_block->p_buffer, false))
     {
-        size_t i_size = ID3TAG_Parse( p_block->p_buffer, p_block->i_buffer,
-                                      ID3TAG_Parse_Handler, static_cast<void *>(this) );
-
-        /* Skip ID3 for demuxer */
-        p_block->p_buffer += i_size;
-        p_block->i_buffer -= i_size;
+        while( p_block->i_buffer )
+        {
+            size_t i_size = ID3TAG_Parse( p_block->p_buffer, p_block->i_buffer,
+                                          ID3TAG_Parse_Handler, static_cast<void *>(this) );
+            /* Skip ID3 for demuxer */
+            p_block->p_buffer += i_size;
+            p_block->i_buffer -= i_size;
+            if( i_size == 0 )
+                break;
+        }
     }
 
     return p_block;



More information about the vlc-commits mailing list