Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: OSD: is it allowed to have multiple instances
Reinhard Nissl wrote:
>
> Hi,
>
> I'm unshure, whether such situations are allowed:
>
> The new OSD is created before the old one is destroyed.
>
> cOsd *a = new cOsd;
> ...
> cOsd *b = new cOsd;
> delete a;
> ...
> delete b;
>
> Stacking OSDs:
>
> cOsd *a = new cOsd;
> ...
> cOsd *b = new cOsd;
> ...
> delete b;
> ...
> delete a;
>
> BTW: the new and delete operations are here just to keep it simple. They get
> executed by the regular API.
>
> Currently, vdr-xine keeps a pointer to the current OSD. The pointer is
> remembered when the 'new' get's executed, and it is forgotten when the
> 'delete' happens.
>
> From time to time, it happens, that e. g. the femon or the dvd plugin kill
> VDR due to an assert in my plugin, that bails out when not the current OSD
> gets deleted.
At any given time there may only be _one_ instance of cOsd.
Maybe I should change cDvbOsdProvider::CreateOsd() so that
it enforces this by returning NULL in case another cOsd is
requested beforethe previous one has been destroyed.
Klaus
Home |
Main Index |
Thread Index