[FFmpeg-devel] [PATCH] movdec: remove nonsensical snprintf.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Jul 29 21:25:46 CEST 2014


Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 libavformat/mov.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 6a9af69..7b1dbb2 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -119,15 +119,13 @@ static int mov_metadata_gnre(MOVContext *c, AVIOContext *pb,
                              unsigned len, const char *key)
 {
     short genre;
-    char buf[20];
 
     avio_r8(pb); // unknown
 
     genre = avio_r8(pb);
     if (genre < 1 || genre > ID3v1_GENRE_MAX)
         return 0;
-    snprintf(buf, sizeof(buf), "%s", ff_id3v1_genre_str[genre-1]);
-    av_dict_set(&c->fc->metadata, key, buf, 0);
+    av_dict_set(&c->fc->metadata, key, ff_id3v1_genre_str[genre-1], 0);
 
     return 0;
 }
-- 
2.0.1



More information about the ffmpeg-devel mailing list