diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-04-22 20:36:56 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-04-28 02:39:37 +0200 |
commit | 52af16bbf5386410872f45f17b25ecb9ff40b97f (patch) | |
tree | 1935f56cda29b5eb6c144d816bc2f292ee13622c | |
parent | 9d767b8a988de512279cf0f8c3a14ce637ef862d (diff) | |
download | ffmpeg-52af16bbf5386410872f45f17b25ecb9ff40b97f.tar.gz |
avformat/fitsenc: Simplify writing header padding
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavformat/fitsenc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libavformat/fitsenc.c b/libavformat/fitsenc.c index 5cf34ef067..37ee10bb13 100644 --- a/libavformat/fitsenc.c +++ b/libavformat/fitsenc.c @@ -24,6 +24,7 @@ * FITS muxer. */ +#include "avio_internal.h" #include "internal.h" typedef struct FITSContext { @@ -177,11 +178,7 @@ static int write_image_header(AVFormatContext *s) lines_written++; lines_left = ((lines_written + 35) / 36) * 36 - lines_written; - memset(buffer, ' ', 80); - while (lines_left > 0) { - avio_write(s->pb, buffer, sizeof(buffer)); - lines_left--; - } + ffio_fill(s->pb, ' ', sizeof(buffer) * lines_left); return 0; } |