[vlc-commits] demux: es: 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:26:08 2016 +0200| [1e3580a4e35a6e705d51fb4b1d11cb7d2fabfbee] | committer: Francois Cartegnie

demux: es: parse chained ID3 tags

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

 modules/demux/mpeg/es.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index 5007eca..1767c45 100644
--- a/modules/demux/mpeg/es.c
+++ b/modules/demux/mpeg/es.c
@@ -931,8 +931,15 @@ static int ID3Parse( demux_t *p_demux, uint64_t i_stream_offset,
     int64_t i_peek = vlc_stream_Peek( p_demux->s, &p_peek, i_stream_offset );
     if( i_peek > 0 && (uint64_t) i_peek == i_stream_offset )
     {
-        (size_t) ID3TAG_Parse( p_peek, i_stream_offset,
-                               pf_callback, (void *) p_demux );
+        while( i_peek > 0 )
+        {
+            size_t i_forward =  ID3TAG_Parse( p_peek, i_peek,
+                                              pf_callback, (void *) p_demux );
+            if(i_forward == 0)
+                break;
+            p_peek += i_forward;
+            i_peek -= i_forward;
+        }
     }
 
     return vlc_stream_Seek( p_demux->s, i_stream_offset );



More information about the vlc-commits mailing list