summaryrefslogtreecommitdiff
path: root/libavformat/omaenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-22 23:47:58 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-27 07:08:59 +0200
commitc8e75076f1d5a53a58da9d14574721f9404c99d4 (patch)
tree76173378404fadf0f35dec6da344074251b9d2f8 /libavformat/omaenc.c
parentffe9867bc22aba87fb016e16a4c628e010f404b3 (diff)
downloadffmpeg-c8e75076f1d5a53a58da9d14574721f9404c99d4.tar.gz
avformat/omaenc: Simplify writing padding
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/omaenc.c')
-rw-r--r--libavformat/omaenc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavformat/omaenc.c b/libavformat/omaenc.c
index ec71956fbd..1c4edcac5c 100644
--- a/libavformat/omaenc.c
+++ b/libavformat/omaenc.c
@@ -29,7 +29,6 @@
static av_cold int oma_write_header(AVFormatContext *s)
{
- int i;
AVCodecParameters *par;
int srate_index;
int isjointstereo;
@@ -55,8 +54,7 @@ static av_cold int oma_write_header(AVFormatContext *s)
avio_w8(s->pb, EA3_HEADER_SIZE >> 7);
avio_w8(s->pb, EA3_HEADER_SIZE & 0x7F);
avio_wl16(s->pb, 0xFFFF); /* not encrypted */
- for (i = 0; i < 6; i++)
- avio_wl32(s->pb, 0); /* Padding + DRM id */
+ ffio_fill(s->pb, 0, 6 * 4); /* Padding + DRM id */
switch (par->codec_tag) {
case OMA_CODECID_ATRAC3:
@@ -88,8 +86,7 @@ static av_cold int oma_write_header(AVFormatContext *s)
av_fourcc2str(par->codec_tag));
return AVERROR(EINVAL);
}
- for (i = 0; i < (EA3_HEADER_SIZE - 36)/4; i++)
- avio_wl32(s->pb, 0); /* Padding */
+ ffio_fill(s->pb, 0, EA3_HEADER_SIZE - 36); /* Padding */
return 0;
}