[FFmpeg-devel] [PATCH 2/4] avformat/aviobuf: Use ffio_fill for padding

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Wed Aug 4 19:21:41 EEST 2021


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavformat/aviobuf.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index e92b3dc610..860fbcae5b 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -26,7 +26,7 @@
 #include "libavutil/log.h"
 #include "libavutil/opt.h"
 #include "libavutil/avassert.h"
-#include "avformat.h"
+#include "libavcodec/defs.h"
 #include "avio.h"
 #include "avio_internal.h"
 #include "internal.h"
@@ -1407,7 +1407,6 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
 {
     DynBuffer *d;
     int size;
-    static const char padbuf[AV_INPUT_BUFFER_PADDING_SIZE] = {0};
     int padding = 0;
 
     if (!s) {
@@ -1417,7 +1416,7 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
 
     /* don't attempt to pad fixed-size packet buffers */
     if (!s->max_packet_size) {
-        avio_write(s, padbuf, sizeof(padbuf));
+        ffio_fill(s, 0, AV_INPUT_BUFFER_PADDING_SIZE);
         padding = AV_INPUT_BUFFER_PADDING_SIZE;
     }
 
-- 
2.30.2



More information about the ffmpeg-devel mailing list