diff options
author | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-23 09:58:01 +0000 |
---|---|---|
committer | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-23 09:58:01 +0000 |
commit | a98fcdb7b3b147c15bd089b5a36fe3db0b0fd55a (patch) | |
tree | 62c860a2d965c9eb17c8c4d14f4fda9b36d2ff44 /loader/dshow/inputpin.c | |
parent | e33a1695bab717d2dd3a7e5c289ed822437b187f (diff) | |
download | mpv-a98fcdb7b3b147c15bd089b5a36fe3db0b0fd55a.tar.bz2 mpv-a98fcdb7b3b147c15bd089b5a36fe3db0b0fd55a.tar.xz |
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22323 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/dshow/inputpin.c')
-rw-r--r-- | loader/dshow/inputpin.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/loader/dshow/inputpin.c b/loader/dshow/inputpin.c index 7ad56669ac..be455f7a6b 100644 --- a/loader/dshow/inputpin.c +++ b/loader/dshow/inputpin.c @@ -5,6 +5,7 @@ */ #include "inputpin.h" +#include "mediatype.h" #include "wine/winerror.h" #include <string.h> #include <stdio.h> @@ -311,12 +312,7 @@ static long STDCALL CInputPin_ConnectionMediaType(IPin* This, Debug printf("CInputPin_ConnectionMediaType(%p) called\n", This); if (!pmt) return E_INVALIDARG; - *pmt=((CInputPin*)This)->type; - if (pmt->cbFormat > 0) - { - pmt->pbFormat=malloc(pmt->cbFormat); - memcpy(pmt->pbFormat, ((CInputPin*)This)->type.pbFormat, pmt->cbFormat); - } + CopyMediaType(pmt,&(((CInputPin*)This)->type)); return 0; } @@ -527,6 +523,7 @@ static long STDCALL CInputPin_NewSegment(IPin* This, static void CInputPin_Destroy(CInputPin* This) { free(This->vt); + FreeMediaType(&(This->type)); free(This); } @@ -550,7 +547,7 @@ CInputPin* CInputPinCreate(CBaseFilter* p, const AM_MEDIA_TYPE* amt) This->refcount = 1; This->parent = p; - This->type = *amt; + CopyMediaType(&(This->type),amt); This->vt= (IPin_vt*) malloc(sizeof(IPin_vt)); |