Mercurial > mplayer.hg
changeset 28190:321b70afabe1
Code simplification
author | reimar |
---|---|
date | Thu, 01 Jan 2009 11:41:09 +0000 |
parents | dd53119e77c8 |
children | a39df27439b9 |
files | libmpdemux/aviprint.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/aviprint.c Thu Jan 01 11:39:47 2009 +0000 +++ b/libmpdemux/aviprint.c Thu Jan 01 11:41:09 2009 +0000 @@ -74,7 +74,7 @@ else if (h->cbSize > 0) { int i; - uint8_t* p = ((uint8_t*)h) + sizeof(WAVEFORMATEX); + uint8_t* p = (uint8_t*)(h + 1); mp_msg(MSGT_HEADER, verbose_level, "Unknown extra header dump: "); for (i = 0; i < h->cbSize; i++) mp_msg(MSGT_HEADER, verbose_level, "[%x] ", p[i]); @@ -96,7 +96,7 @@ if (h->biSize > sizeof(BITMAPINFOHEADER)) { int i; - uint8_t* p = ((uint8_t*)h) + sizeof(BITMAPINFOHEADER); + uint8_t* p = (uint8_t*)(h + 1); mp_msg(MSGT_HEADER, verbose_level, "Unknown extra header dump: "); for (i = 0; i < h->biSize-sizeof(BITMAPINFOHEADER); i++) mp_msg(MSGT_HEADER, verbose_level, "[%x] ", *(p+i)); @@ -135,7 +135,8 @@ int i; unsigned int pos[256]; unsigned int num[256]; - for(i=0;i<256;i++) num[i]=pos[i]=0; + memset(pos, 0, sizeof(pos)); + memset(num, 0, sizeof(num)); for(i=0;i<idx_size;i++){ int id=avi_stream_id(idx[i].ckid); if(id<0 || id>255) id=255;