[Ffmpeg-cvslog] r7644 - trunk/libavformat/asf.c
michael
subversion
Mon Jan 22 12:03:47 CET 2007
Author: michael
Date: Mon Jan 22 12:03:47 2007
New Revision: 7644
Modified:
trunk/libavformat/asf.c
Log:
get rid of some sensless malloc/free
Modified: trunk/libavformat/asf.c
==============================================================================
--- trunk/libavformat/asf.c (original)
+++ trunk/libavformat/asf.c Mon Jan 22 12:03:47 2007
@@ -339,11 +339,10 @@
{
int name_len,value_type,value_len;
uint64_t value_num = 0;
- char *name;
+ char name[1024];
name_len = get_le16(pb);
- name = av_malloc(name_len * 2);
- get_str16_nolen(pb, name_len, name, name_len * 2);
+ get_str16_nolen(pb, name_len, name, sizeof(name));
value_type = get_le16(pb);
value_len = get_le16(pb);
if ((value_type == 0) || (value_type == 1)) // unicode or byte
@@ -360,7 +359,6 @@
if (strcmp(name,"WM/Track")==0) s->track = value_num + 1;
if (strcmp(name,"WM/TrackNumber")==0) s->track = value_num;
}
- av_free(name);
}
} else if (!memcmp(&g, &ext_stream_header, sizeof(GUID))) {
int ext_len, payload_ext_ct, stream_ct;
More information about the ffmpeg-cvslog
mailing list