mirror of https://github.com/mpv-player/mpv
fourcc mapping fixed - 10l to someone
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2682 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a28c29e8f3
commit
d79da48df5
|
@ -37,7 +37,6 @@ static int add_to_fourcc(char *s, char *alias, unsigned int *fourcc,
|
||||||
unsigned int *map)
|
unsigned int *map)
|
||||||
{
|
{
|
||||||
int i, j, freeslots;
|
int i, j, freeslots;
|
||||||
char *aliasp;
|
|
||||||
unsigned int tmp;
|
unsigned int tmp;
|
||||||
|
|
||||||
/* find first unused slot */
|
/* find first unused slot */
|
||||||
|
@ -47,14 +46,13 @@ static int add_to_fourcc(char *s, char *alias, unsigned int *fourcc,
|
||||||
if (!freeslots)
|
if (!freeslots)
|
||||||
goto err_out_too_many;
|
goto err_out_too_many;
|
||||||
|
|
||||||
aliasp = (alias) ? alias : s;
|
|
||||||
do {
|
do {
|
||||||
tmp = mmioFOURCC(s[0], s[1], s[2], s[3]);
|
tmp = mmioFOURCC(s[0], s[1], s[2], s[3]);
|
||||||
for (j = 0; j < i; j++)
|
for (j = 0; j < i; j++)
|
||||||
if (tmp == fourcc[j])
|
if (tmp == fourcc[j])
|
||||||
goto err_out_duplicated;
|
goto err_out_duplicated;
|
||||||
fourcc[i] = tmp;
|
fourcc[i] = tmp;
|
||||||
map[i] = mmioFOURCC(aliasp[0], aliasp[1], aliasp[2], aliasp[3]);
|
map[i] = alias ? mmioFOURCC(alias[0], alias[1], alias[2], alias[3]) : tmp;
|
||||||
s += 4;
|
s += 4;
|
||||||
i++;
|
i++;
|
||||||
} while ((*(s++) == ',') && --freeslots);
|
} while ((*(s++) == ',') && --freeslots);
|
||||||
|
|
Loading…
Reference in New Issue