Re: Filter controlled graph building
From: Alessandro Angeli [MVP::DigitalMedia] (nobody_at_nowhere.in.the.net)
Date: 06/24/04
- Previous message: Alessandro Angeli [MVP::DigitalMedia]: "Re: Filter controlled graph building"
- In reply to: The March Hare (MVP): "Re: Filter controlled graph building"
- Next in thread: Alessandro Angeli [MVP::DigitalMedia]: "Re: Filter controlled graph building"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 24 Jun 2004 20:24:42 +0200
The March Hare (MVP) wrote:
>> And potentially a crash without this added line. :)
>
> Acutally, it needs to go before the
> pi.Filter->GetClassId, doesn't it?
The check for pi.pFilter is a bit paranoid IMHO :-) even if
it does not hurt: how can a pin exist without an owning
filter? Of course, the implementation can be buggy and set
the value to NULL, even if the documentation does not say it
is allowed.
Besides, the actual crash can come if QueryPinInfo() fails,
in which case pi.pFilter may be !NULL but still completely
random, since I did not initialize it, so the result of the
call should really be checked first.
Paranoia should also lead to check the result of
GetClassID() for success, but how can it fail when it just
needs to copy 16 bytes of memory without allocating
anything? However a filter is not really required to have a
CLSID unless it is a globally registered one, so not
checking may prove to be a dangerous gamble with WMP that
adds stuff on its own.
-- /** * Alessandro Angeli * * MVP :: Digital Media * * a dot angeli at biosys dot net */
- Previous message: Alessandro Angeli [MVP::DigitalMedia]: "Re: Filter controlled graph building"
- In reply to: The March Hare (MVP): "Re: Filter controlled graph building"
- Next in thread: Alessandro Angeli [MVP::DigitalMedia]: "Re: Filter controlled graph building"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|