mirror of
https://github.com/horgh/videostreamer.git
synced 2025-09-26 20:41:31 +08:00
Manually set dts if it's the same as the last we output
In #1 we changed to manually set it if it is less than the last we output. Apparently there are streams where it can be equal as well. If we don't do this, then we see errors such as "Application provided invalid, non monotonically increasing dts to muxer"
This commit is contained in:
@@ -376,7 +376,7 @@ vs_write_packet(const struct VSInput * const input,
|
||||
// 3.2.4 at least) there is logic to rewrite the dts and warn if it happens.
|
||||
// Let's do the same. Note my logic is a little different here.
|
||||
if (pkt->dts != AV_NOPTS_VALUE && output->last_dts != AV_NOPTS_VALUE &&
|
||||
pkt->dts < output->last_dts) {
|
||||
pkt->dts <= output->last_dts) {
|
||||
int64_t const next_dts = output->last_dts+1;
|
||||
|
||||
if (verbose) {
|
||||
|
Reference in New Issue
Block a user