[vlc-commits] mpeg/es: fix dts probe in WAV

Thomas Guillem git at videolan.org
Fri Oct 28 18:03:00 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Oct 28 12:00:22 2016 +0200| [0d49618e71cc5c6758f6b25d63f237eed76185d0] | committer: Thomas Guillem

mpeg/es: fix dts probe in WAV

pi_samples is needed to check if the sync is followed by an other sync when the
WAV file has 0 padding.

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

 modules/demux/mpeg/es.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index 1767c45..f2f287a 100644
--- a/modules/demux/mpeg/es.c
+++ b/modules/demux/mpeg/es.c
@@ -1163,7 +1163,11 @@ static int DtsCheckSync( const uint8_t *p_peek, int *pi_samples )
     vlc_dts_header_t dts;
     if( vlc_dts_header_Parse( &dts, p_peek, 11 ) == VLC_SUCCESS
      && dts.i_frame_size > 0 && dts.i_frame_size <= 8192 )
+    {
+        if( pi_samples )
+            *pi_samples = dts.i_frame_length;
         return dts.i_frame_size;
+    }
     else
         return VLC_EGENERIC;
 }



More information about the vlc-commits mailing list