[FFmpeg-devel] [PATCH] lavu/opt: handle NULL during class comparsion
Lukasz Marek
lukasz.m.luki2 at gmail.com
Wed Dec 3 14:29:54 CET 2014
On 3 December 2014 at 14:10, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Wed, Dec 03, 2014 at 12:06:18AM +0100, Lukasz Marek wrote:
> > av_opt_copy compares classes to avoid copying between mismatched objects.
> > This protection fails when dest class is NULL.
>
> does this case actually occur ?
>
Yes and no.
There was a crush in ffmpeg, when avcodec_copy_context was called on
context of codec that has no class in priv context.
It is fixed by:
[PATCH] lavc/options: don't copy priv context when it is not AVOption
object.
Calling this function on non-avclass object is misuse of this function of
course. So probably patch is not needed, but maybe doesn't hurt.
More information about the ffmpeg-devel
mailing list