Record a packet with its duration
Record a packet only once the following has been received, so that we can set its duration before muxing it. Fixes <https://github.com/Genymobile/scrcpy/issues/702>
This commit is contained in:
@@ -34,6 +34,12 @@ struct recorder {
|
||||
bool stopped; // set on recorder_stop() by the stream reader
|
||||
bool failed; // set on packet write failure
|
||||
struct recorder_queue queue;
|
||||
|
||||
// we can write a packet only once we received the next one so that we can
|
||||
// set its duration (next_pts - current_pts)
|
||||
// "previous" is only accessed from the recorder thread, so it does not
|
||||
// need to be protected by the mutex
|
||||
struct record_packet *previous;
|
||||
};
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user