[FFmpeg-devel] ffplay is missing avcodec_thread_free()
Benoit Fouet
benoit.fouet
Fri Jul 6 15:49:29 CEST 2007
Hi,
Janne Grunau wrote:
> On Thursday 28 June 2007 18:57:54 Michael Niedermayer wrote:
>
>> Hi
>>
>> On Mon, Jun 18, 2007 at 12:11:28PM +0200, Thorsten Jordan wrote:
>>
>>> Hello,
>>>
>>> ffplay can use multithreading, but the avcodec_thread_free() call
>>> is missing before avcodec_close().
>>> The attached patch fixes this (or tries to...)
>>>
>> why not put the avcodec_thread_free() call in avcodec_close() ?
>>
>
> as attached patch?
>
> Janne
>
> ------------------------------------------------------------------------
>
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index 33c2c36..4d6ed77 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -991,6 +991,8 @@ int avcodec_close(AVCodecContext *avctx)
> return -1;
> }
>
> + if (ENABLE_THREADS && avctx->thread_opaque)
> + avcodec_thread_free(avctx);
>
i don't think ENABLE_THREADS is useful
> if (avctx->codec->close)
> avctx->codec->close(avctx);
> avcodec_default_free_buffers(avctx);
>
--
Ben
Purple Labs S.A.
www.purplelabs.com
More information about the ffmpeg-devel
mailing list