changeset 4357:10e0d8797a43 libavformat

simplify usage of dstlen as it is not a parameter anymore
author aurel
date Mon, 02 Feb 2009 22:17:14 +0000
parents 459c0242194e
children 39f767e66f49
files mp3.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mp3.c	Mon Feb 02 22:14:28 2009 +0000
+++ b/mp3.c	Mon Feb 02 22:17:14 2009 +0000
@@ -170,16 +170,14 @@
 static void id3v2_read_ttag(AVFormatContext *s, int taglen, const char *key)
 {
     char *q, dst[512];
-    int len, dstlen = sizeof(dst);
+    int len, dstlen = sizeof(dst) - 1;
     unsigned genre;
 
-    if(dstlen > 0)
         dst[0]= 0;
     if(taglen < 1)
         return;
 
     taglen--; /* account for encoding type byte */
-    dstlen--; /* Leave space for zero terminator */
 
     switch(get_byte(s->pb)) { /* encoding type */