]> git.sesse.net Git - vlc/commitdiff
Implemented ES priority flag in avformat demuxer.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 20 Feb 2010 12:06:15 +0000 (13:06 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 20 Feb 2010 13:11:25 +0000 (14:11 +0100)
modules/demux/avformat/demux.c

index 4595bd9a22da44a7f79b758381ea36000c218993..4787ef7f28d89fdd41d81b5452c1be04babe5347 100644 (file)
@@ -339,6 +339,8 @@ int OpenDemux( vlc_object_t *p_this )
             break;
         }
         fmt.psz_language = strdup( s->language );
+        if( s->disposition & AV_DISPOSITION_DEFAULT )
+            fmt.i_priority = 1000;
 
 #ifdef HAVE_FFMPEG_CODEC_ATTACHMENT
         if( cc->codec_type != CODEC_TYPE_ATTACHMENT )
@@ -405,6 +407,8 @@ int OpenDemux( vlc_object_t *p_this )
             }
         }
         es = es_out_Add( p_demux->out, &fmt );
+        if( s->disposition & AV_DISPOSITION_DEFAULT )
+            es_out_Control( p_demux->out, ES_OUT_SET_ES_DEFAULT, es );
         es_format_Clean( &fmt );
 
         msg_Dbg( p_demux, "adding es: %s codec = %4.4s",