1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

simplify usage of dstlen as it is not a parameter anymore

Originally committed as revision 16956 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs
2009-02-02 22:17:14 +00:00
parent ee56cab3f3
commit 3b1c4a06f6

View File

@@ -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) static void id3v2_read_ttag(AVFormatContext *s, int taglen, const char *key)
{ {
char *q, dst[512]; char *q, dst[512];
int len, dstlen = sizeof(dst); int len, dstlen = sizeof(dst) - 1;
unsigned genre; unsigned genre;
if(dstlen > 0)
dst[0]= 0; dst[0]= 0;
if(taglen < 1) if(taglen < 1)
return; return;
taglen--; /* account for encoding type byte */ taglen--; /* account for encoding type byte */
dstlen--; /* Leave space for zero terminator */
switch(get_byte(s->pb)) { /* encoding type */ switch(get_byte(s->pb)) { /* encoding type */