Commit 991cf86e authored by michael's avatar michael

get rid of some sensless malloc/free


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7644 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent db27bb93
...@@ -339,11 +339,10 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -339,11 +339,10 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
{ {
int name_len,value_type,value_len; int name_len,value_type,value_len;
uint64_t value_num = 0; uint64_t value_num = 0;
char *name; char name[1024];
name_len = get_le16(pb); name_len = get_le16(pb);
name = av_malloc(name_len * 2); get_str16_nolen(pb, name_len, name, sizeof(name));
get_str16_nolen(pb, name_len, name, name_len * 2);
value_type = get_le16(pb); value_type = get_le16(pb);
value_len = get_le16(pb); value_len = get_le16(pb);
if ((value_type == 0) || (value_type == 1)) // unicode or byte if ((value_type == 0) || (value_type == 1)) // unicode or byte
...@@ -360,7 +359,6 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -360,7 +359,6 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (strcmp(name,"WM/Track")==0) s->track = value_num + 1; if (strcmp(name,"WM/Track")==0) s->track = value_num + 1;
if (strcmp(name,"WM/TrackNumber")==0) s->track = value_num; if (strcmp(name,"WM/TrackNumber")==0) s->track = value_num;
} }
av_free(name);
} }
} else if (!memcmp(&g, &ext_stream_header, sizeof(GUID))) { } else if (!memcmp(&g, &ext_stream_header, sizeof(GUID))) {
int ext_len, payload_ext_ct, stream_ct; int ext_len, payload_ext_ct, stream_ct;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment