[vlc-commits] demux: avi: fix master track selection with nonseekable

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 16:45:21 2016 +0100| [345b9c419d36f2b5e1b88ca11d89cf07f4cf8f7c] | committer: Francois Cartegnie

demux: avi: fix master track selection with nonseekable

(otherwise drops packets)

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

 modules/demux/avi/avi.c |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 9044986..3b2b100 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -1331,13 +1331,17 @@ static int Demux_UnSeekable( demux_t *p_demux )
             b |= b_extra;
         }
 
-        if( b && tk->i_cat == VIDEO_ES )
-        {
-            p_stream_master = tk;
-        }
-        else if( b )
+        if( b )
         {
-            p_stream_master = tk;
+            if( tk->i_cat == VIDEO_ES )
+            {
+                p_stream_master = tk;
+                break;
+            }
+            else if( !tk )
+            {
+                p_stream_master = tk;
+            }
         }
     }
 



More information about the vlc-commits mailing list