[MPlayer-dev-eng] [PATCH] Wrong typecast in loader/dshow/output.c
Vladimir Voroshilov
voroshil at gmail.com
Sun Feb 25 16:58:57 CET 2007
2007/2/10, Roberto Togni <rxt at rtogni.it>:
> On Sun, 28 Jan 2007 02:03:10 +0600
> "Vladimir Voroshilov" <voroshil at gmail.com> wrote:
>
> > COutputMemPin_Queryinterface belongs to COutputMemPin, but casts This
> > parameter as COutputPin. This does not affect until DirectShow call
> > QueryInterface to retrive IMemInputPin from COutputMemPin. For
> > example:
> >
> > Example1:
> > pPin->vt->QueryInterface(pPin,&IID_IMemInputPin,&pMemPin1); // FINE
> > pPin->vt->QueryInterface(pPin,&IID_IMemInputPin,&pMemPin2); // FINE
> >
> > Example2:
> > pPin->vt->QueryInterface(pPin,&IID_IMemInputPin,&pMemPin1); // FINE
> > pMemPin1->vt->QueryInterface(pMemPin1,&IID_IMemInputPin,&pMemPin2);
> > //Should crash
> >
> > Seem like DirectShow binary codecs usually does not query IMemInputPin
> > interface from IMemInputPin and thus all works fine.
> >
> > Attached patch fixes this bug.
> > I have tested it under Linux with divxds dshow codec and all works fine.
> >
> > Opinions?
>
> Untested, but looks ok.
Here is some synthetic test. Without patch MPlayer is crashed. With - all ok.
Since there are no objections against this patch, i want to apply it tomorrow.
--
Regards,
Vladimir Voroshilov mailto:voroshil at gmail.com
JID: voroshil at jabber.ru
ICQ: 95587719
-------------- next part --------------
A non-text attachment was scrubbed...
Name: synthetic_test.diff
Type: application/octet-stream
Size: 801 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070225/bb090ae0/attachment.obj>
More information about the MPlayer-dev-eng
mailing list