dmo.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. diff -Nur xine-lib-1.1.15-old/src/libw32dll/dmo/DMO_VideoDecoder.c xine-lib-1.1.15/src/libw32dll/dmo/DMO_VideoDecoder.c
  2. --- xine-lib-1.1.15-old/src/libw32dll/dmo/DMO_VideoDecoder.c 2008-09-27 20:55:34.000000000 +0300
  3. +++ xine-lib-1.1.15/src/libw32dll/dmo/DMO_VideoDecoder.c 2008-09-27 21:33:01.000000000 +0300
  4. @@ -87,7 +87,7 @@
  5. { 24, 24, &MEDIASUBTYPE_RGB24, CAP_NONE },
  6. { 32, 32, &MEDIASUBTYPE_RGB32, CAP_NONE },
  7. - {0},
  8. + {0,0,NULL,0},
  9. };
  10. DMO_VideoDecoder * DMO_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEADER * format, int flip, int maxauto)
  11. @@ -288,8 +288,8 @@
  12. props.cBuffers = 1;
  13. props.cbBuffer = this->m_sDestType.lSampleSize;
  14. - //don't know how to do this correctly
  15. - props.cbAlign = props.cbPrefix = 0;
  16. + props.cbAlign = 1;
  17. + props.cbPrefix = 0;
  18. this->m_pDMO_Filter->m_pAll->vt->SetProperties(this->m_pDMO_Filter->m_pAll, &props, &props1);
  19. this->m_pDMO_Filter->m_pAll->vt->Commit(this->m_pDMO_Filter->m_pAll);
  20. #endif
  21. @@ -327,7 +327,7 @@
  22. bufferin = CMediaBufferCreate(size, (void*)src, size, 0);
  23. result = this->m_pDMO_Filter->m_pMedia->vt->ProcessInput(this->m_pDMO_Filter->m_pMedia, 0,
  24. (IMediaBuffer*)bufferin,
  25. - (is_keyframe) ? DMO_INPUT_DATA_BUFFERF_SYNCPOINT : 0,
  26. + DMO_INPUT_DATA_BUFFERF_SYNCPOINT,
  27. 0, 0);
  28. ((IMediaBuffer*)bufferin)->vt->Release((IUnknown*)bufferin);
  29. @@ -463,8 +463,9 @@
  30. this->iv.m_obh.biSize = sizeof(BITMAPINFOHEADER);
  31. this->iv.m_obh.biCompression=csp;
  32. this->iv.m_obh.biBitCount=bits;
  33. - this->iv.m_obh.biSizeImage=labs(this->iv.m_obh.biBitCount*
  34. - this->iv.m_obh.biWidth*this->iv.m_obh.biHeight)>>3;
  35. +
  36. + this->iv.m_obh.biSizeImage = labs(this->iv.m_obh.biWidth * this->iv.m_obh.biHeight)
  37. + * ((this->iv.m_obh.biBitCount + 7) / 8);
  38. }
  39. }
  40. this->m_sDestType.lSampleSize = this->iv.m_obh.biSizeImage;