diff --git a/libavformat/soxenc.c b/libavformat/soxenc.c index 9a7a4f41cf..d4d3e3754f 100644 --- a/libavformat/soxenc.c +++ b/libavformat/soxenc.c @@ -77,8 +77,7 @@ static int sox_write_header(AVFormatContext *s) if (comment_len) avio_write(pb, comment->value, comment_len); - for ( ; comment_size > comment_len; comment_len++) - avio_w8(pb, 0); + ffio_fill(pb, 0, comment_size - comment_len); avio_flush(pb);