[vlc-devel] [PATCH] dummy vout: check for sys->pool before deleting it.

Rémi Denis-Courmont remi at remlab.net
Sat Jan 23 16:00:55 CET 2010


Le lundi 18 janvier 2010 20:16:12 Ramiro Polla, vous avez écrit :
> $subj

Merged thanks.

> I believe a similar check may be needed in modules/video_output/vmem.c
> and modules/video_output/snapshot.c, but I haven't checked in depth
> and it might be that if the pool is not created, Open() fails and so
> there's no call to delete it (just guessing).
> 
> There's also something weird about this code in
>  modules/video_output/vmem.c: /* */
>     picture_pool_configuration_t pool;
>     memset(&pool, 0, sizeof(pool));
>     pool.picture_count = 1;
>     pool.picture       = &picture;
>     pool.lock          = Lock;
>     pool.unlock        = Unlock;
>     sys->pool = picture_pool_NewExtended(&pool);
>     if (!sys->pool) {
>         picture_Release(picture);
>         free(sys);
>         return VLC_SUCCESS;
>     }
> 
> Shouldn't it return VLC_EGENERIC?

Yes it should. This is a bug.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list