[FFmpeg-devel] ffplay is missing avcodec_thread_free()
Fri Jun 29 09:10:55 CEST 2007
Michael Niedermayer schrieb:
> On Mon, Jun 18, 2007 at 12:11:28PM +0200, Thorsten Jordan wrote:
>> 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 i see it in the code, avcodec_thread_free() accesses
AVCodecContext->thread_opaque and its members directly without check.
But the thread_opaque value is only set up in avcodec_thread_init.
So doing this without any further check will lead to segfaults.
If a check is added in avcodec_close() then there is no argument against
calling avcodec_thread_free() there.
Btw, is there a howto about patches? just diff -Naur between two files
is wrong. Do you keep 2 trees of the source to diff them? Any hints? thanks
More information about the ffmpeg-devel