Fix the commit ab794ce70 (2023-11-23) that fixed (incorrectly) the
CID 424197.
If should_exit was set before waiting in pthread_cond_timedwait, the
infinite loop is never left. Moreover, it seems that the loop was left
only on should_exit timeout, not when notified by condition variable.
This is mostly to make Coverity happy - the spurious wakeup here does
not matter in any way. So reverting the original "fix" would be enough.
If both encoder and decoder of the same name is present, eg. jpeg2000,
print help for both encoder and decoder. Since for the decoder, options
are also printed with enc=<enc>:help, print both enc and dec at the
same time.
In case that set_param callback modifies some field use a copy to be
reentrant for next attempted pixfmt (or reconfiguration).
The other alternative would be to set the pointer to setparam struct
const, but some setters currenty really modify the params.
User may be tempted to set the bitrate although CRF is now default,
so unset pred-struct (because it won't work with current
ffmpeg/libxsvtav1).
But issue a (serious) warning in this case.
This reverts commit fa8bb8ca8e.
Actually this worsened the behavior significantly by increasing the
latency in the order of 100 frames (depending on properties). This
(currently) disallows setting the bitrate, using CRF/CQP is only possible
because the FFmpeg plugin isn't able to set CBR for now.
set_forced_idr function was unnecessary - the error handling can now
do chec_av_opt_set(). Moreover it prints out the setting to std output
even when succeeded.
this fixes CID 464474
Although quite serious, this didn't exhibit problem so far, because:
1. dump_tree is not so much often called
2. the mutex is recursive (doubtfull if it won't be better if they
weren't), so that this will be tolerant to re-locking from the same thread
Fixed correctly the problem that was incorrectly attempted by the
previous commit revert. should_exit doesn't need to be checked with the
main while loop because it is done by the inner one.
refers to CID 464439
Actually not much important - the m_started variable is not shared across
threads but should be used only from within the main thread (start()
stop() member functions).
Replace _source_ r,g,b magic numbers and variables with new constants
indicating that the shift applies on input (not output as usual for the
rgb shifts in fnction declaration /for out RGBA only/).