1
mirror of https://github.com/mpv-player/mpv synced 2024-10-22 08:51:57 +02:00

new func: select_codec() - disables codec by name

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7506 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-09-26 01:28:32 +00:00
parent 0520689fa6
commit e8cc8584f1
2 changed files with 18 additions and 0 deletions

View File

@ -749,6 +749,23 @@ codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,
return NULL;
}
void select_codec(char* codecname,int audioflag){
int i;
codecs_t *c;
// printf("select_codec('%s')\n",codecname);
if (audioflag) {
i = nr_acodecs;
c = audio_codecs;
} else {
i = nr_vcodecs;
c = video_codecs;
}
if(i)
for (/* NOTHING */; i--; c++)
if(!strcmp(c->name,codecname))
c->flags|=CODECS_FLAG_SELECTED;
}
void codecs_reset_selection(int audioflag){
int i;
codecs_t *c;

View File

@ -61,6 +61,7 @@ int parse_codec_cfg(char *cfgfile);
codecs_t* find_video_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start);
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 select_codec(char* codecname,int audioflag);
void list_codecs(int audioflag);
void codecs_reset_selection(int audioflag);