Skip to content
Snippets Groups Projects
Commit 3281dab0 authored by Thomas Guillem's avatar Thomas Guillem
Browse files

avcodec: use a mutex instead of sem

Using a mutex instead of a sem allows avcodec callbacks to not wait for a
future pf_decode and pf_flush call.

The semaphore was used because ffmpeg was not thread-safe in that time. Indeed,
the additional goal of the semaphore was to prevent any concurrent avcodec
call.

The mutex protect the pts, the p_va, the dec->fmt_out variables, the
decoder_UpdateVideoFormat() and the decoder_NewPicture() call. Indeed,
decoder_UpdateVideoFormat() is not reentrant and the caller should take care
about serialization.
parent b2e31462
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment