[FFmpeg-cvslog] r21558 - in trunk/libavformat: isom.c isom.h

reimar subversion
Sat Jan 30 22:54:06 CET 2010


Author: reimar
Date: Sat Jan 30 22:54:06 2010
New Revision: 21558

Log:
Always consider the mov language code as 4 bytes fixed size and change the
function declaration to reflect this.

Modified:
   trunk/libavformat/isom.c
   trunk/libavformat/isom.h

Modified: trunk/libavformat/isom.c
==============================================================================
--- trunk/libavformat/isom.c	Sat Jan 30 22:50:47 2010	(r21557)
+++ trunk/libavformat/isom.c	Sat Jan 30 22:54:06 2010	(r21558)
@@ -266,7 +266,7 @@ static const char * const mov_mdhd_langu
     "cat", "lat", "que", "grn", "aym", "tat", "uig", "dzo", "jav"
 };
 
-int ff_mov_iso639_to_lang(const char *lang, int mp4)
+int ff_mov_iso639_to_lang(const char lang[4], int mp4)
 {
     int i, code = 0;
 
@@ -293,9 +293,10 @@ int ff_mov_iso639_to_lang(const char *la
     return code;
 }
 
-int ff_mov_lang_to_iso639(unsigned code, char *to)
+int ff_mov_lang_to_iso639(unsigned code, char to[4])
 {
     int i;
+    memset(to, 0, 4);
     /* is it the mangled iso code? */
     /* see http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt */
     if (code > 138) {

Modified: trunk/libavformat/isom.h
==============================================================================
--- trunk/libavformat/isom.h	Sat Jan 30 22:50:47 2010	(r21557)
+++ trunk/libavformat/isom.h	Sat Jan 30 22:54:06 2010	(r21558)
@@ -34,8 +34,8 @@ extern const AVCodecTag codec_movvideo_t
 extern const AVCodecTag codec_movaudio_tags[];
 extern const AVCodecTag ff_codec_movsubtitle_tags[];
 
-int ff_mov_iso639_to_lang(const char *lang, int mp4);
-int ff_mov_lang_to_iso639(unsigned code, char *to);
+int ff_mov_iso639_to_lang(const char lang[4], int mp4);
+int ff_mov_lang_to_iso639(unsigned code, char to[4]);
 
 /* the QuickTime file format is quite convoluted...
  * it has lots of index tables, each indexing something in another one...



More information about the ffmpeg-cvslog mailing list