[vlc-commits] demux: avi: default to first track if none selected

Francois Cartegnie git at videolan.org
Mon Jan 11 21:17:28 CET 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jan 11 17:10:41 2016 +0100| [c586536a21dda5f946235c0ab513bc8dcea1f414] | committer: Francois Cartegnie

demux: avi: default to first track if none selected

avoids failing with delayed start tracks

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

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

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 3b2b100..bae8a3c 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -1347,8 +1347,15 @@ static int Demux_UnSeekable( demux_t *p_demux )
 
     if( !p_stream_master )
     {
-        msg_Warn( p_demux, "no more stream selected" );
-        return( 0 );
+        if( p_sys->i_track )
+        {
+            p_stream_master = p_sys->track[0];
+        }
+        else
+        {
+            msg_Warn( p_demux, "no more stream selected" );
+            return( 0 );
+        }
     }
 
     p_sys->i_time = AVI_GetPTS( p_stream_master );



More information about the vlc-commits mailing list