pw_utils: Set pts to -1 in spa_meta_header
Browse files at this commita30ca7983b2f1fc3ddeb209b3fe18fa78e0dbd25Parent: 49fc6111 changed file +7 -0
src/screencasting/pw_utils.rsmodified+7 -0
| @@ -1434,6 +1434,13 @@ unsafe fn mark_buffer_as_good(pw_buffer: NonNull<pw_buffer>, sequence: &mut u64) | |||
| 1434 | // Clear the corrupted flag we may have set before. | 1434 | // Clear the corrupted flag we may have set before. |
| 1435 | (*header).flags = 0; | 1435 | (*header).flags = 0; |
| 1436 | (*header).seq = *sequence; | 1436 | (*header).seq = *sequence; |
| 1437 | + | ||
| 1438 | + // Set buffer timestamp as unknown. | ||
| 1439 | + // | ||
| 1440 | + // FIXME: we could try passing real presentation timestamps for rendered frames here. | ||
| 1441 | + // However, then we must also ensure that the time base never jumps (e.g. when switching a | ||
| 1442 | + // dynamic cast between outputs) as this would mess up the timing downstream. | ||
| 1443 | + (*header).pts = -1; | ||
| 1437 | } | 1444 | } |
| 1438 | } | 1445 | } |
| 1439 | 1446 | ||