Mercurial > mplayer.hg
comparison loader/dshow/outputpin.c @ 18878:3bf0d70b4c7f
rm unnecesary casts from void* - part 2
author | reynaldo |
---|---|
date | Sun, 02 Jul 2006 03:59:36 +0000 |
parents | 0783dd397f74 |
children | 9472dc33de99 |
comparison
equal
deleted
inserted
replaced
18877:45befbaf1912 | 18878:3bf0d70b4c7f |
---|---|
54 if (cMediaTypes <= 0) | 54 if (cMediaTypes <= 0) |
55 return 0; | 55 return 0; |
56 | 56 |
57 if (pcFetched) | 57 if (pcFetched) |
58 *pcFetched=1; | 58 *pcFetched=1; |
59 ppMediaTypes[0] = (AM_MEDIA_TYPE *)malloc(sizeof(AM_MEDIA_TYPE)); | 59 ppMediaTypes[0] = malloc(sizeof(AM_MEDIA_TYPE)); |
60 // copy structures - C can handle this... | 60 // copy structures - C can handle this... |
61 **ppMediaTypes = *type; | 61 **ppMediaTypes = *type; |
62 if (ppMediaTypes[0]->pbFormat) | 62 if (ppMediaTypes[0]->pbFormat) |
63 { | 63 { |
64 ppMediaTypes[0]->pbFormat=(char *)malloc(ppMediaTypes[0]->cbFormat); | 64 ppMediaTypes[0]->pbFormat=malloc(ppMediaTypes[0]->cbFormat); |
65 memcpy(ppMediaTypes[0]->pbFormat, type->pbFormat, ppMediaTypes[0]->cbFormat); | 65 memcpy(ppMediaTypes[0]->pbFormat, type->pbFormat, ppMediaTypes[0]->cbFormat); |
66 } | 66 } |
67 if (cMediaTypes == 1) | 67 if (cMediaTypes == 1) |
68 return 0; | 68 return 0; |
69 return 1; | 69 return 1; |
217 if (!pmt) | 217 if (!pmt) |
218 return E_INVALIDARG; | 218 return E_INVALIDARG; |
219 *pmt = ((COutputPin*)This)->type; | 219 *pmt = ((COutputPin*)This)->type; |
220 if (pmt->cbFormat>0) | 220 if (pmt->cbFormat>0) |
221 { | 221 { |
222 pmt->pbFormat=(char *)malloc(pmt->cbFormat); | 222 pmt->pbFormat=malloc(pmt->cbFormat); |
223 memcpy(pmt->pbFormat, ((COutputPin*)This)->type.pbFormat, pmt->cbFormat); | 223 memcpy(pmt->pbFormat, ((COutputPin*)This)->type.pbFormat, pmt->cbFormat); |
224 } | 224 } |
225 return 0; | 225 return 0; |
226 } | 226 } |
227 | 227 |