diff options
-rw-r--r-- | codec-cfg.c | 17 | ||||
-rw-r--r-- | codec-cfg.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/codec-cfg.c b/codec-cfg.c index f52aeb16dd..168c1c3195 100644 --- a/codec-cfg.c +++ b/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; diff --git a/codec-cfg.h b/codec-cfg.h index 24a0d87330..4d97dccb5b 100644 --- a/codec-cfg.h +++ b/codec-cfg.h @@ -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); |