summaryrefslogtreecommitdiff
path: root/libavformat/webm_chunk.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-03-01 04:56:07 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-03-26 02:08:17 +0100
commit3d4dd9195f6892b3e9d04dc543d6211095248d22 (patch)
treecb7e29dc2f2eb3ddc1135b435e07ee297078a690 /libavformat/webm_chunk.c
parente70c2d02fc5c12b82628c6f6eda4dfd357685e8c (diff)
downloadffmpeg-3d4dd9195f6892b3e9d04dc543d6211095248d22.tar.gz
avformat/webm_chunk: Avoid unnecessary flushes
The webm_chunk muxer caches its output to a dynamic buffer and when it outputs anything, it explicitly flushes it. So set the flags indicating that flushing after each packet should not be done automatically (basically avoiding avio_write_marker() to be called by flush_if_needed() in libavformat/mux.c). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/webm_chunk.c')
-rw-r--r--libavformat/webm_chunk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c
index 9e4c375c3f..d4b2eb6dff 100644
--- a/libavformat/webm_chunk.c
+++ b/libavformat/webm_chunk.c
@@ -72,10 +72,12 @@ static int chunk_mux_init(AVFormatContext *s)
oc->interrupt_callback = s->interrupt_callback;
oc->max_delay = s->max_delay;
- oc->flags = s->flags;
+ oc->flags = s->flags & ~AVFMT_FLAG_FLUSH_PACKETS;
oc->strict_std_compliance = s->strict_std_compliance;
oc->avoid_negative_ts = s->avoid_negative_ts;
+ oc->flush_packets = 0;
+
av_dict_copy(&oc->metadata, s->metadata, 0);
if (!(st = avformat_new_stream(oc, NULL)))