mirror of
https://github.com/mpv-player/mpv
synced 2025-02-06 23:21:54 +00: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:
parent
0520689fa6
commit
e8cc8584f1
17
codec-cfg.c
17
codec-cfg.c
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user