aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-07-15 17:39:55 +0000
committerPaul B Mahol <onemda@gmail.com>2013-07-15 17:51:12 +0000
commit95126728a5bda8ee68444f0873ac76be8f11abf1 (patch)
tree7d708450b44255322d6499ae0c510aa2b858eb28
parent69383d055e778cb9c358e01597bee8e254835adb (diff)
downloadffmpeg-95126728a5bda8ee68444f0873ac76be8f11abf1.tar.gz
mxfenc: use ffio_fill()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavformat/mxfenc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 367b6e46be..b3ab1733ed 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -42,6 +42,7 @@
#include "libavcodec/dnxhddata.h"
#include "audiointerleave.h"
#include "avformat.h"
+#include "avio_internal.h"
#include "internal.h"
#include "mxf.h"
#include "config.h"
@@ -1294,8 +1295,7 @@ static void mxf_write_klv_fill(AVFormatContext *s)
avio_write(s->pb, klv_fill_key, 16);
pad -= 16 + 4;
klv_encode_ber4_length(s->pb, pad);
- for (; pad; pad--)
- avio_w8(s->pb, 0);
+ ffio_fill(s->pb, 0, pad);
av_assert1(!(avio_tell(s->pb) & (KAG_SIZE-1)));
}
}
@@ -1870,13 +1870,11 @@ static void mxf_write_d10_video_packet(AVFormatContext *s, AVStream *st, AVPacke
avio_write(s->pb, klv_fill_key, 16);
pad -= 16 + 4;
klv_encode_ber4_length(s->pb, pad);
- for (; pad; pad--)
- avio_w8(s->pb, 0);
+ ffio_fill(s->pb, 0, pad);
av_assert1(!(avio_tell(s->pb) & (KAG_SIZE-1)));
} else {
av_log(s, AV_LOG_WARNING, "cannot fill d-10 video packet\n");
- for (; pad > 0; pad--)
- avio_w8(s->pb, 0);
+ ffio_fill(s->pb, 0, pad);
}
}