diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-24 13:37:31 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-24 13:38:47 +0200 |
commit | d34d3304a8b72d845ef501c89af5600456d11ddb (patch) | |
tree | b7e9571b0d95090116e6662300cf870955218160 | |
parent | 2e1e10a6bb7dc8ed296ee1964aa784407f51d72c (diff) | |
download | ffmpeg-d34d3304a8b72d845ef501c89af5600456d11ddb.tar.gz |
avformat/wavenc: do not hardcode array size in memset and other functions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/wavenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c index 6f66be1b19..b782d8cf24 100644 --- a/libavformat/wavenc.c +++ b/libavformat/wavenc.c @@ -270,13 +270,13 @@ static void peak_write_chunk(AVFormatContext *s) if (wav->peak_block_pos) peak_write_frame(s); - memset(timestamp, 0, 28); + memset(timestamp, 0, sizeof(timestamp)); if (!(s->flags & AVFMT_FLAG_BITEXACT)) { av_log(s, AV_LOG_INFO, "Writing local time and date to Peak Envelope Chunk\n"); now0 = av_gettime(); now_secs = now0 / 1000000; - strftime(timestamp, 28, "%Y:%m:%d:%H:%M:%S:", localtime(&now_secs)); - av_strlcatf(timestamp, 28, "%03d", (int)((now0 / 1000) % 1000)); + strftime(timestamp, sizeof(timestamp), "%Y:%m:%d:%H:%M:%S:", localtime(&now_secs)); + av_strlcatf(timestamp, sizeof(timestamp), "%03d", (int)((now0 / 1000) % 1000)); } avio_wl32(pb, 1); /* version */ |