From fbf84aa57e07132c26490e543146d262db2ae4a1 Mon Sep 17 00:00:00 2001 From: arpi Date: Mon, 25 Mar 2002 03:07:27 +0000 Subject: [PATCH] use codec selection git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5327 b3059339-0415-0410-9bf9-f77b7e298cf2 --- codec-cfg.c | 1 + codec-cfg.h | 1 + mplayer.c | 1 + 3 files changed, 3 insertions(+) diff --git a/codec-cfg.c b/codec-cfg.c index d63e95f63a..d5f52d0c15 100644 --- a/codec-cfg.c +++ b/codec-cfg.c @@ -698,6 +698,7 @@ codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap, if(!i) return NULL; for (/* NOTHING */; i--; c++) { if(start && c<=start) continue; + if(c->flags&CODECS_FLAG_SELECTED) continue; for (j = 0; j < CODECS_MAX_FOURCC; j++) { if (c->fourcc[j]==fourcc || c->driver==0) { if (fourccmap) diff --git a/codec-cfg.h b/codec-cfg.h index 7381a9e501..9157900981 100644 --- a/codec-cfg.h +++ b/codec-cfg.h @@ -104,5 +104,6 @@ codecs_t* find_video_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_ codecs_t* find_audio_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start); codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,codecs_t *start,int audioflag); void list_codecs(int audioflag); +void codecs_reset_selection(int audioflag); #endif diff --git a/mplayer.c b/mplayer.c index a955dd5a12..598d959e06 100644 --- a/mplayer.c +++ b/mplayer.c @@ -1187,6 +1187,7 @@ mp_msg(MSGT_CPLAYER,MSGL_INFO,"================================================= // Go through the codec.conf and find the best codec... sh_video->inited=0; +codecs_reset_selection(0); if(video_codec){ // forced codec by name: mp_msg(MSGT_CPLAYER,MSGL_INFO,"Forced video codec: %s\n",video_codec);