fftools/ffmpeg_mux: allocate sq_pkt in setup_sync_queues()

This is now possible since setup_sync_queues() can interact with Muxer.
This commit is contained in:
Anton Khirnov
2022-10-13 14:51:16 +02:00
parent 65d106933a
commit a55ca682e2
2 changed files with 10 additions and 11 deletions

View File

@@ -671,14 +671,6 @@ int of_muxer_init(OutputFile *of, AVFormatContext *fc,
if (strcmp(of->format->name, "rtp"))
want_sdp = 0;
if (of->sq_mux) {
mux->sq_pkt = av_packet_alloc();
if (!mux->sq_pkt) {
ret = AVERROR(ENOMEM);
goto fail;
}
}
/* write the header for files with no streams */
if (of->format->flags & AVFMT_NOSTREAMS && fc->nb_streams == 0) {
ret = mux_check_init(of);