[vlc-commits] commit: Used char [size] instead of char * in mp4. c for the iso639 conversion table. (Laurent Aimar )
git at videolan.org
git at videolan.org
Sun Oct 31 13:05:27 CET 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Oct 31 12:30:12 2010 +0100| [5c45e94271453fba518d384df6632608708ffad2] | committer: Laurent Aimar
Used char [size] instead of char * in mp4.c for the iso639 conversion table.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c45e94271453fba518d384df6632608708ffad2
---
modules/demux/mp4/mp4.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 011e7bf..0527d2a 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -2715,7 +2715,7 @@ static void MP4_TrackSetELST( demux_t *p_demux, mp4_track_t *tk,
/* */
static const char *MP4_ConvertMacCode( uint16_t i_code )
{
- static const struct { const char *psz_iso639_1; uint16_t i_code; } p_cvt[] = {
+ static const struct { const char psz_iso639_1[3]; uint16_t i_code; } p_cvt[] = {
{ "en", 0 }, { "fr", 1 }, { "de", 2 }, { "it", 3 }, { "nl", 4 },
{ "sv", 5 }, { "es", 6 }, { "da", 7 }, { "pt", 8 }, { "no", 9 },
{ "he", 10 }, { "ja", 11 }, { "ar", 12 }, { "fi", 13 }, { "el", 14 },
@@ -2742,10 +2742,10 @@ static const char *MP4_ConvertMacCode( uint16_t i_code )
{ "gl", 140 }, { "af", 141 }, { "br", 142 }, { "iu", 143 }, { "gd", 144 },
{ "gv", 145 }, { "ga", 146 }, { "to", 147 }, { "el", 148 },
/* */
- { NULL, 0 }
+ { "", 0 }
};
int i;
- for( i = 0; p_cvt[i].psz_iso639_1 != NULL; i++ )
+ for( i = 0; *p_cvt[i].psz_iso639_1; i++ )
{
if( p_cvt[i].i_code == i_code )
return p_cvt[i].psz_iso639_1;
More information about the vlc-commits
mailing list