#include "mux.h"
+#include <algorithm>
#include <assert.h>
+#include <mutex>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <algorithm>
-#include <mutex>
#include <string>
#include <utility>
#include <vector>
lock_guard<mutex> lock(mu);
if (write_strategy == WriteStrategy::WRITE_BACKGROUND) {
packet_queue.push_back(QueuedPacket{ av_packet_clone(&pkt_copy), pts });
- if (plug_count == 0) packet_queue_ready.notify_all();
+ if (plug_count == 0)
+ packet_queue_ready.notify_all();
} else if (plug_count > 0) {
packet_queue.push_back(QueuedPacket{ av_packet_clone(&pkt_copy), pts });
} else {
int64_t old_pos = avctx->pb->pos;
if (av_interleaved_write_frame(avctx, const_cast<AVPacket *>(&pkt)) < 0) {
fprintf(stderr, "av_interleaved_write_frame() failed\n");
- exit(1);
+ abort();
}
avio_flush(avctx->pb);
for (MuxMetrics *metric : metrics) {