Skip to content

Commit

Permalink
Disable reorder queue if doing encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Nov 23, 2024
1 parent 65e098c commit 1da0fa0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/zm_videostore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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;
Expand Down

0 comments on commit 1da0fa0

Please sign in to comment.