[vlc-commits] demux: ogg: fix oggds header check

Francois Cartegnie git at videolan.org
Sat May 26 18:08:37 CEST 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed May 23 12:17:58 2018 +0200| [413347123ab58208cc5f64522fbab11ba9a1baaa] | committer: Jean-Baptiste Kempf

demux: ogg: fix oggds header check

(cherry picked from commit 4b206fc0989a2d9d5acdcb166bc426a1e9cd9f04)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/demux/ogg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 7dcd78a946..7d791f196f 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -1014,7 +1014,8 @@ static void Ogg_UpdatePCR( demux_t *p_demux, logical_stream_t *p_stream,
     {
         /* We're in headers, and we haven't parsed 1st data packet yet */
 //        p_stream->i_pcr = VLC_TS_UNKNOWN;
-        if( p_stream->b_oggds && ogg_page_packets( p_oggpacket ) )
+        if( p_stream->b_oggds && p_oggpacket->bytes > 0 &&
+            (p_oggpacket->packet[0] & PACKET_TYPE_HEADER) == 0 )
         {
             p_stream->i_pcr = VLC_TS_0 + p_ogg->i_nzpcr_offset;
         }



More information about the vlc-commits mailing list