Changeset 327782b2b7ba8666e5533ea584224df6e356af6b
- Timestamp:
- 11/21/07 19:23:18
(10 months ago)
- Author:
- Christophe Massiot <massiot@videolan.org>
- git-committer:
- Christophe Massiot <massiot@videolan.org> 1195669398 +0000
- git-parent:
[f4dea8999102b24fce42877ac32f561de4967c5f]
- git-author:
- Christophe Massiot <massiot@videolan.org> 1195669398 +0000
- Message:
- sec/input/es_out.c: Add suport for keyword 'any' in lists of languages ;
also fix a memory leak.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2004c8b |
r327782b |
|
| 1964 | 1964 | if( psz ) *psz++ = '\0'; |
|---|
| 1965 | 1965 | |
|---|
| 1966 | | psz_code = LanguageGetCode( psz_parser ); |
|---|
| 1967 | | if( strcmp( psz_code, "??" ) ) |
|---|
| 1968 | | { |
|---|
| 1969 | | TAB_APPEND( i_psz, ppsz, psz_code ); |
|---|
| | 1966 | if( !strcmp( psz_parser, "any" ) ) |
|---|
| | 1967 | { |
|---|
| | 1968 | TAB_APPEND( i_psz, ppsz, strdup("any") ); |
|---|
| | 1969 | } |
|---|
| | 1970 | else |
|---|
| | 1971 | { |
|---|
| | 1972 | psz_code = LanguageGetCode( psz_parser ); |
|---|
| | 1973 | if( strcmp( psz_code, "??" ) ) |
|---|
| | 1974 | { |
|---|
| | 1975 | TAB_APPEND( i_psz, ppsz, psz_code ); |
|---|
| | 1976 | } |
|---|
| | 1977 | else |
|---|
| | 1978 | { |
|---|
| | 1979 | free( psz_code ); |
|---|
| | 1980 | } |
|---|
| 1970 | 1981 | } |
|---|
| 1971 | 1982 | |
|---|
| … | … | |
| 1989 | 2000 | |
|---|
| 1990 | 2001 | for( i = 0; ppsz_langs[i]; i++ ) |
|---|
| 1991 | | if( !strcasecmp( ppsz_langs[i], psz_lang ) ) return i; |
|---|
| | 2002 | { |
|---|
| | 2003 | if( !strcasecmp( ppsz_langs[i], psz_lang ) || |
|---|
| | 2004 | !strcasecmp( ppsz_langs[i], "any" ) ) |
|---|
| | 2005 | { |
|---|
| | 2006 | return i; |
|---|
| | 2007 | } |
|---|
| | 2008 | } |
|---|
| 1992 | 2009 | |
|---|
| 1993 | 2010 | return -1; |
|---|