[SCM] libav/experimental: Always consider the mov language code as 4 bytes fixed size and change the function declaration to reflect this.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:59:04 UTC 2013


The following commit has been merged in the experimental branch:
commit 1c90d2985d5f4ca5dd74459712109b7438e4c9bf
Author: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date:   Sat Jan 30 21:54:06 2010 +0000

    Always consider the mov language code as 4 bytes fixed size and change the
    function declaration to reflect this.
    
    Originally committed as revision 21558 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/isom.c b/libavformat/isom.c
index e54a5c9..62daed0 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -266,7 +266,7 @@ static const char * const mov_mdhd_language_map[] = {
     "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 *lang, int mp4)
     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) {
diff --git a/libavformat/isom.h b/libavformat/isom.h
index c8141f1..2661e8d 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -34,8 +34,8 @@ extern const AVCodecTag codec_movvideo_tags[];
 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...

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list