Skip to content

Commit fb271cc

Browse files
committed
ffi: Document that thread safety is the caller's responsibility.
1 parent 7c0833e commit fb271cc

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

mp4parse_capi/src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,11 @@ pub struct Mp4parseFragmentInfo {
345345

346346
/// Parser state for MP4 files, exposed to C callers via raw pointer.
347347
///
348+
/// # Thread safety
349+
///
350+
/// A parser instance must not be accessed from multiple threads
351+
/// concurrently. The caller is responsible for serializing all access.
352+
///
348353
/// # Pointer stability
349354
///
350355
/// Several C API functions return raw pointers into data cached on this
@@ -475,6 +480,12 @@ impl ContextParser for Mp4parseParser {
475480
}
476481
}
477482

483+
/// Parser state for AVIF files, exposed to C callers via raw pointer.
484+
///
485+
/// # Thread safety
486+
///
487+
/// A parser instance must not be accessed from multiple threads
488+
/// concurrently. The caller is responsible for serializing all access.
478489
#[derive(Default)]
479490
pub struct Mp4parseAvifParser {
480491
context: AvifContext,

0 commit comments

Comments
 (0)