Make Encoder, Decoder and Repacketizer Send-able.

This commit is contained in:
Ram Kaniyur 2018-07-17 03:24:55 +10:00
parent 0d2167ffa5
commit 55d988beac

View File

@ -385,6 +385,8 @@ impl Drop for Encoder {
}
}
unsafe impl Send for Encoder {}
// ============================================================================
// Decoder
@ -529,6 +531,8 @@ impl Drop for Decoder {
}
}
unsafe impl Send for Decoder {}
// ============================================================================
// Packet Analysis
@ -705,6 +709,8 @@ impl Drop for Repacketizer {
}
}
unsafe impl Send for Repacketizer {}
// To understand why these lifetime bounds are needed, imagine that the
// repacketizer keeps an internal Vec<&'buf [u8]>, which is added to by cat()
// and accessed by get_nb_frames(), out(), and out_range(). To prove that these