diff libmpdemux/demux_lavf.c @ 36682:68794f2fbf1e

Add support for default of multiple video tracks. Some container formats like matroska support multiple video tracks, one of which may be flagged the 'default' one which thus should be played by default. Works with the lavf demuxer.
author ib
date Sun, 02 Feb 2014 19:18:31 +0000
parents 4eb54147c488
children 92dd1764392a
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c	Sun Feb 02 10:54:37 2014 +0000
+++ b/libmpdemux/demux_lavf.c	Sun Feb 02 19:18:31 2014 +0000
@@ -403,6 +403,8 @@
             sh_video->i_bps=codec->bit_rate/8;
             if (title && title->value)
                 mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VID_%d_NAME=%s\n", priv->video_streams, title->value);
+            if (st->disposition & AV_DISPOSITION_DEFAULT)
+                sh_video->default_track = 1;
             if (rot && rot->value)
                 mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VID_%d_ROTATE=%s\n", priv->video_streams, rot->value);
             mp_msg(MSGT_DEMUX,MSGL_DBG2,"aspect= %d*%d/(%d*%d)\n",