Re: Filter controlled graph building

From: Alessandro Angeli [MVP::DigitalMedia] (nobody_at_nowhere.in.the.net)
Date: 06/24/04

  • Next message: The March Hare (MVP): "Re: Filter controlled graph building"
    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
     */
    

  • Next message: The March Hare (MVP): "Re: Filter controlled graph building"

    Relevant Pages

    • Re: WMV Professional ???
      ... > The March Hare (MVP) wrote: ... >> BTW, I'm glad Alessandro jumped in this thread. ... > * Alessandro Angeli ... > * a dot angeli at biosys dot net ...
      (microsoft.public.windowsmedia.encoder)
    • Re: Loading a filter graph rather than constructing one
      ... not to use exlicit device wrappers ... Alessandro Angeli ... MVP:: Digital Media ... a dot angeli at biosys dot net */ ...
      (microsoft.public.win32.programmer.directx.video)
    • Re: urgent: how to get AVI file duration in C#? (sample code)
      ... >>> i want to get AVI file duration for my C# application. ... > * Alessandro Angeli ... > * MVP:: Digital Media ... > * a dot angeli at biosys dot net ...
      (microsoft.public.win32.programmer.directx.video)
    • Re: Control panel and VMR9
      ... > You have installed the DX9 SDK on your machine and ... Alessandro Angeli ... MVP:: Digital Media ... a dot angeli at biosys dot net ...
      (microsoft.public.win32.programmer.directx.video)
    • Re: VMR9 Compatible Hardware?
      ... The March Hare [MVP] wrote: ... simple textured D3D9 surface. ... -- // Alessandro Angeli ... // a dot angeli at psynet dot net ...
      (microsoft.public.win32.programmer.directx.video)

    Loading