Regarding exclusive processing of ctx in "00_video_decode"

Hi.

I have a question about “00_video_decode” in “Jetson multimedia api”.

A decoder context called “context_t ctx” is used in this sample program.

ctx is generated in the main thread (main()) and passed to the subthread (dec_capture_loop_fcn).
In other words, ctx is shared between the main thread and subthreads.

I’m concerned about exclusive control.
It seems that exclusive control (such as Mutex) is not used when accessing ctx, but is it not necessary?

I am creating a decoding application using this sample program as a reference.
Therefore, if exclusive control is necessary, I would like to implement it.

Thank you.

Hi,
The context has all required variables, but they are not accessed concurrently in multiple threads. If you have variables which may be concurrently accessed, please create mutex to protect it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.