mirror of https://github.com/mpv-player/mpv
tagging selected codec to avoid trying the same codec several times
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5326 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8784c88322
commit
43d70441a6
16
codec-cfg.c
16
codec-cfg.c
|
@ -702,6 +702,7 @@ codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,
|
||||||
if (c->fourcc[j]==fourcc || c->driver==0) {
|
if (c->fourcc[j]==fourcc || c->driver==0) {
|
||||||
if (fourccmap)
|
if (fourccmap)
|
||||||
*fourccmap = c->fourccmap[j];
|
*fourccmap = c->fourccmap[j];
|
||||||
|
c->flags|=CODECS_FLAG_SELECTED;
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -710,6 +711,21 @@ codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void codecs_reset_selection(int audioflag){
|
||||||
|
int i;
|
||||||
|
codecs_t *c;
|
||||||
|
if (audioflag) {
|
||||||
|
i = nr_acodecs;
|
||||||
|
c = audio_codecs;
|
||||||
|
} else {
|
||||||
|
i = nr_vcodecs;
|
||||||
|
c = video_codecs;
|
||||||
|
}
|
||||||
|
if(i)
|
||||||
|
for (/* NOTHING */; i--; c++)
|
||||||
|
c->flags&=(~CODECS_FLAG_SELECTED);
|
||||||
|
}
|
||||||
|
|
||||||
void list_codecs(int audioflag){
|
void list_codecs(int audioflag){
|
||||||
int i;
|
int i;
|
||||||
codecs_t *c;
|
codecs_t *c;
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
// Global flags:
|
// Global flags:
|
||||||
#define CODECS_FLAG_SEEKABLE (1<<0)
|
#define CODECS_FLAG_SEEKABLE (1<<0)
|
||||||
|
#define CODECS_FLAG_SELECTED (1<<15) /* for internal use */
|
||||||
|
|
||||||
// Outfmt flags:
|
// Outfmt flags:
|
||||||
#define CODECS_FLAG_FLIP (1<<0)
|
#define CODECS_FLAG_FLIP (1<<0)
|
||||||
|
|
Loading…
Reference in New Issue