summaryrefslogtreecommitdiff
path: root/avconv_opt.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-05-23 10:48:26 +0200
committerAnton Khirnov <anton@khirnov.net>2016-05-30 17:08:56 +0200
commit2546bf2ae62703211342593ff71381c5fd0648db (patch)
tree3649639d4e463aaa8ecdc7c12681a0753d73582f /avconv_opt.c
parentac477367bc5ca1a3256991943f50f85dc1419a9e (diff)
avconv: buffer the packets written while the muxer is not initialized
Diffstat (limited to 'avconv_opt.c')
-rw-r--r--avconv_opt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/avconv_opt.c b/avconv_opt.c
index 2a4f71a6ff..e966e49061 100644
--- a/avconv_opt.c
+++ b/avconv_opt.c
@@ -1083,6 +1083,10 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
ost->pix_fmts[0] = ost->pix_fmts[1] = AV_PIX_FMT_NONE;
ost->last_mux_dts = AV_NOPTS_VALUE;
+ ost->muxing_queue = av_fifo_alloc(8 * sizeof(AVPacket));
+ if (!ost->muxing_queue)
+ exit_program(1);
+
return ost;
}