Hi, On Wed, Oct 26, 2011 at 7:58 AM, Janne Grunau <[email protected]> wrote: > Otherwise the delay expressed in has_b_frames increases with every > avcodec_close/avcodec_open. > Fixes fate-ea-dct with more than 1 thread. > --- > libavcodec/pthread.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c > index d5129dc..7557e68 100644 > --- a/libavcodec/pthread.c > +++ b/libavcodec/pthread.c > @@ -681,6 +681,7 @@ static void frame_thread_free(AVCodecContext *avctx, int > thread_count) > av_freep(&fctx->threads); > pthread_mutex_destroy(&fctx->buffer_mutex); > av_freep(&avctx->thread_opaque); > + avctx->has_b_frames -= avctx->thread_count - 1; > } > > static int frame_thread_init(AVCodecContext *avctx)
OK. I agree with you (on IRC) that we're abusing variables for things they weren't intended to solve. Maybe max_delay should be a copy of has_b_frames and in case of threading be this derivative, so that we don't destroy the variable and don't have to restore it later on. But that's all just loud thinking, I'm not sure... Ronald _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
