Mercurial > mplayer.hg
comparison loader/dmo/DMO_VideoDecoder.c @ 18878:3bf0d70b4c7f
rm unnecesary casts from void* - part 2
author | reynaldo |
---|---|
date | Sun, 02 Jul 2006 03:59:36 +0000 |
parents | b612f732e420 |
children | 2934974c366a |
comparison
equal
deleted
inserted
replaced
18877:45befbaf1912 | 18878:3bf0d70b4c7f |
---|---|
117 unsigned int bihs; | 117 unsigned int bihs; |
118 | 118 |
119 bihs = (format->biSize < (int) sizeof(BITMAPINFOHEADER)) ? | 119 bihs = (format->biSize < (int) sizeof(BITMAPINFOHEADER)) ? |
120 sizeof(BITMAPINFOHEADER) : format->biSize; | 120 sizeof(BITMAPINFOHEADER) : format->biSize; |
121 | 121 |
122 this->iv.m_bh = (BITMAPINFOHEADER*)malloc(bihs); | 122 this->iv.m_bh = malloc(bihs); |
123 memcpy(this->iv.m_bh, format, bihs); | 123 memcpy(this->iv.m_bh, format, bihs); |
124 | 124 |
125 this->iv.m_State = STOP; | 125 this->iv.m_State = STOP; |
126 //this->iv.m_pFrame = 0; | 126 //this->iv.m_pFrame = 0; |
127 this->iv.m_Mode = DIRECT; | 127 this->iv.m_Mode = DIRECT; |
129 this->iv.m_iPlaypos = -1; | 129 this->iv.m_iPlaypos = -1; |
130 this->iv.m_fQuality = 0.0f; | 130 this->iv.m_fQuality = 0.0f; |
131 this->iv.m_bCapable16b = true; | 131 this->iv.m_bCapable16b = true; |
132 | 132 |
133 bihs += sizeof(VIDEOINFOHEADER) - sizeof(BITMAPINFOHEADER); | 133 bihs += sizeof(VIDEOINFOHEADER) - sizeof(BITMAPINFOHEADER); |
134 this->m_sVhdr = (VIDEOINFOHEADER*)malloc(bihs); | 134 this->m_sVhdr = malloc(bihs); |
135 memset(this->m_sVhdr, 0, bihs); | 135 memset(this->m_sVhdr, 0, bihs); |
136 memcpy(&this->m_sVhdr->bmiHeader, this->iv.m_bh, this->iv.m_bh->biSize); | 136 memcpy(&this->m_sVhdr->bmiHeader, this->iv.m_bh, this->iv.m_bh->biSize); |
137 this->m_sVhdr->rcSource.left = this->m_sVhdr->rcSource.top = 0; | 137 this->m_sVhdr->rcSource.left = this->m_sVhdr->rcSource.top = 0; |
138 this->m_sVhdr->rcSource.right = this->m_sVhdr->bmiHeader.biWidth; | 138 this->m_sVhdr->rcSource.right = this->m_sVhdr->bmiHeader.biWidth; |
139 this->m_sVhdr->rcSource.bottom = this->m_sVhdr->bmiHeader.biHeight; | 139 this->m_sVhdr->rcSource.bottom = this->m_sVhdr->bmiHeader.biHeight; |