Skip to content

Commit 97f1cc1

Browse files
committed
ffi: Document that thread safety is the caller's responsibility.
1 parent 918d504 commit 97f1cc1

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
@@ -301,6 +301,11 @@ pub struct Mp4parseFragmentInfo {
301301

302302
/// Parser state for MP4 files, exposed to C callers via raw pointer.
303303
///
304+
/// # Thread safety
305+
///
306+
/// A parser instance must not be accessed from multiple threads
307+
/// concurrently. The caller is responsible for serializing all access.
308+
///
304309
/// # Pointer stability
305310
///
306311
/// Several C API functions return raw pointers into data cached on this
@@ -431,6 +436,12 @@ impl ContextParser for Mp4parseParser {
431436
}
432437
}
433438

439+
/// Parser state for AVIF files, exposed to C callers via raw pointer.
440+
///
441+
/// # Thread safety
442+
///
443+
/// A parser instance must not be accessed from multiple threads
444+
/// concurrently. The caller is responsible for serializing all access.
434445
#[derive(Default)]
435446
pub struct Mp4parseAvifParser {
436447
context: AvifContext,

0 commit comments

Comments
 (0)