[vlc-commits] demux: mp4: ignore SPU when setting PCR

Francois Cartegnie git at videolan.org
Wed Jun 11 16:03:03 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jun 11 15:56:47 2014 +0200| [3cebf08dc4b826f4fa627ac2978eab00830a23d5] | committer: Francois Cartegnie

demux: mp4: ignore SPU when setting PCR

otherwise breaks PCR update on seek

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

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

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 460c74d..df158af 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -930,7 +930,9 @@ end:
         for( i_track = 0; i_track < p_sys->i_tracks; i_track++ )
         {
             mp4_track_t *tk = &p_sys->track[i_track];
-            if ( !tk->b_ok || !tk->b_selected ) continue;
+            if ( !tk->b_ok || !tk->b_selected  ||
+                 (tk->fmt.i_cat != AUDIO_ES && tk->fmt.i_cat != VIDEO_ES) )
+                continue;
             p_sys->i_pcr = __MIN( MP4_TrackGetDTS( p_demux, tk ), p_sys->i_pcr );
             p_sys->i_time = p_sys->i_pcr * p_sys->i_timescale / CLOCK_FREQ;
         }



More information about the vlc-commits mailing list