summaryrefslogtreecommitdiff
path: root/libavformat/mp3.c
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2009-02-02 22:17:14 +0000
committerAurelien Jacobs <aurel@gnuage.org>2009-02-02 22:17:14 +0000
commit3b1c4a06f684563ee06eafb83635473fa88c8bbe (patch)
tree785427363328fc22ef71952b31c6fe52841fdaa9 /libavformat/mp3.c
parentee56cab3f344bb1370cae59fdff27904f74e6a4e (diff)
simplify usage of dstlen as it is not a parameter anymore
Originally committed as revision 16956 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mp3.c')
-rw-r--r--libavformat/mp3.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/mp3.c b/libavformat/mp3.c
index ba3baf1423..f81c24872c 100644
--- a/libavformat/mp3.c
+++ b/libavformat/mp3.c
@@ -170,16 +170,14 @@ static unsigned int id3v2_get_size(ByteIOContext *s, int len)
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 */