Skip to content

Commit

Permalink
Do not reorder packets if doing encoding as we use wallclock timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Jul 9, 2024
1 parent cec41c1 commit 0ee6249
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/zm_videostore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ bool VideoStore::open() {
reorder_queue_size = std::stoul(entry->value);
// 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() and !monitor->WallClockTimestamps()) {
} else if (monitor->has_out_of_order_packets()
and !monitor->WallClockTimestamps()
// Only sort packets for passthrough. Encoding uses wallclock by default
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);
Expand Down

0 comments on commit 0ee6249

Please sign in to comment.