Disable reorder queue if doing encoding
parent
65e098c35b
commit
1da0fa0af3
|
@ -148,7 +148,12 @@ bool VideoStore::open() {
|
|||
} else {
|
||||
const AVDictionaryEntry *entry = av_dict_get(opts, "reorder_queue_size", nullptr, AV_DICT_MATCH_CASE);
|
||||
if (entry) {
|
||||
reorder_queue_size = std::stoul(entry->value);
|
||||
if (monitor->GetOptVideoWriter() == Monitor::ENCODE) {
|
||||
Debug(1, "reorder_queue_size ignored for non-passthrough");
|
||||
} else {
|
||||
reorder_queue_size = std::stoul(entry->value);
|
||||
Debug(1, "reorder_queue_size set to %zu", reorder_queue_size);
|
||||
}
|
||||
// remove it to prevent complaining later.
|
||||
av_dict_set(&opts, "reorder_queue_size", nullptr, AV_DICT_MATCH_CASE);
|
||||
} else if (monitor->has_out_of_order_packets()
|
||||
|
@ -157,8 +162,8 @@ bool VideoStore::open() {
|
|||
and monitor->GetOptVideoWriter() == Monitor::PASSTHROUGH
|
||||
) {
|
||||
reorder_queue_size = 2*monitor->get_max_keyframe_interval();
|
||||
Debug(1, "reorder_queue_size set to %zu", reorder_queue_size);
|
||||
}
|
||||
Debug(1, "reorder_queue_size set to %zu", reorder_queue_size);
|
||||
}
|
||||
|
||||
oc->metadata = pmetadata;
|
||||
|
|
Loading…
Reference in New Issue