[x264-devel] x264_encoder_reconfig and multithreading

Loren Merritt lorenm at u.washington.edu
Fri Jan 25 06:12:52 CET 2008


On Fri, 25 Jan 2008, Benjamin Pracht wrote:

> Playing a bit with x264_encoder_reconfig while multithreading is
> enabled, I realized that this function only changes the parameters in
> the main x264_t handle, which is equal to h->thread[0] if my
> understanding is good. The consequence is that other threads still seem
> to use the old parameters.
>
> Is that an expected behaviour, is x264_encoder_reconfig not supposed to
> be used in multithreaded mode, or are you interested in a patch that
> loops on all the available thread handles to change the parameters?

Changing parameters asynchronously while the threads are running just 
sounds like a bad idea, even if it happens to work now.
The correct way is to do the copying in x264_thread_sync_context.

--Loren Merritt



More information about the x264-devel mailing list