From 6883dcd3ce6db1ffc874c0bf33c788106819a8c8 Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Sat, 20 Feb 2010 13:06:15 +0100 Subject: [PATCH] Implemented ES priority flag in avformat demuxer. --- modules/demux/avformat/demux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c index 4595bd9a22..4787ef7f28 100644 --- a/modules/demux/avformat/demux.c +++ b/modules/demux/avformat/demux.c @@ -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", -- 2.39.2