diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-01-22 11:03:47 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-01-22 11:03:47 +0000 |
commit | d045b8c14bb4d7f7af8c2c76c44c968284400cf5 (patch) | |
tree | 0be238dd1090bedf15bacbf051a35a236fcfe2a7 | |
parent | 916bb12c90d4cdf7427c513493ea8aa150803bb5 (diff) | |
download | ffmpeg-d045b8c14bb4d7f7af8c2c76c44c968284400cf5.tar.gz |
get rid of some sensless malloc/free
Originally committed as revision 7644 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/asf.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index 391dac7ed7..7cf31228ce 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -339,11 +339,10 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) { 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 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) 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; |