diff mbox series

[FFmpeg-devel,18/27] avformat/asfenc: Simplify writing error correction data

Message ID AM7PR03MB666047B4380B043A088C4A0D8FA39@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit b98e397252b1950240e04e47e92d17fd8275073a
Headers show
Series [FFmpeg-devel,01/27] avformat/astenc: Simplify writing padding
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 23, 2021, 3:28 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
Equivalent to avio_w16(pb, 0x0).

 libavformat/asfenc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 07588772c6..a0510df7dc 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -838,8 +838,7 @@  static int put_payload_parsing_info(AVFormatContext *s,
     av_assert0(padsize >= 0);
 
     avio_w8(pb, ASF_PACKET_ERROR_CORRECTION_FLAGS);
-    for (int i = 0; i < ASF_PACKET_ERROR_CORRECTION_DATA_SIZE; i++)
-        avio_w8(pb, 0x0);
+    ffio_fill(pb, 0x0, ASF_PACKET_ERROR_CORRECTION_DATA_SIZE);
 
     if (asf->multi_payloads_present)
         iLengthTypeFlags |= ASF_PPI_FLAG_MULTIPLE_PAYLOADS_PRESENT;