summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorsesse <sesse@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-03-06 11:12:32 +0000
committersesse <sesse@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-03-06 11:12:32 +0000
commita8804d4d71be121446ea2afc067ec1dcf241f8ad (patch)
tree1ed905b18d45070dd4f5169527880d44260fd2e6 /libmpcodecs
parentb951d42e4eba1e4edbbb5fe11f6ebdd04c891b23 (diff)
downloadmpv-a8804d4d71be121446ea2afc067ec1dcf241f8ad.tar.bz2
mpv-a8804d4d71be121446ea2afc067ec1dcf241f8ad.tar.xz
Fix QuickTime emulated OSErr type.
The OSErr type on Mac OS X is int16_t, not int32_t (see http://developer.apple.com/mac/library/documentation/QuickTime/Reference/QTRef_DataTypes/Reference/reference.html). The upper 16 bits will typically be something random (they're entirely undefined). Change the type so it's right; a few places tried to compensate for this by masking out the upper bits, but a few places also missed them, which made for unpredictable behavior. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30854 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_qtvideo.c12
-rw-r--r--libmpcodecs/ve_qtvideo.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/libmpcodecs/vd_qtvideo.c b/libmpcodecs/vd_qtvideo.c
index 8e73c84753..aeead624e0 100644
--- a/libmpcodecs/vd_qtvideo.c
+++ b/libmpcodecs/vd_qtvideo.c
@@ -90,7 +90,7 @@ static OSErr (*QTNewGWorldFromPtr)(GWorldPtr *gw,
GWorldFlags flags,
void *baseAddr,
long rowBytes);
-static OSErr (*NewHandleClear)(Size byteCount);
+static Handle (*NewHandleClear)(Size byteCount);
#endif /* #ifndef CONFIG_QUICKTIME */
// to set/get/query special features/parameters
@@ -103,7 +103,7 @@ static int codec_initialized=0;
// init driver
static int init(sh_video_t *sh){
#ifndef CONFIG_QUICKTIME
- long result = 1;
+ OSErr result = 1;
#endif
ComponentResult cres;
ComponentDescription desc;
@@ -156,7 +156,7 @@ static int init(sh_video_t *sh){
result=InitializeQTML(6+16);
// result=InitializeQTML(0);
- mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"InitializeQTML returned %li\n",result);
+ mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"InitializeQTML returned %d\n",result);
// result=EnterMovies();
// printf("EnterMovies->%d\n",result);
#endif /* CONFIG_QUICKTIME */
@@ -305,7 +305,7 @@ static void uninit(sh_video_t *sh){
// decode a frame
static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
- long result = 1;
+ OSErr result = 1;
int i;
mp_image_t* mpi;
ComponentResult cres;
@@ -335,7 +335,7 @@ if(!codec_initialized){
0,
mpi->planes[0],
mpi->stride[0]);
- mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"NewGWorldFromPtr returned:%ld\n",65536-(result&0xffff));
+ mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"NewGWorldFromPtr returned:%d\n",result);
// if (65536-(result&0xFFFF) != 10000)
// return NULL;
@@ -406,7 +406,7 @@ if(!codec_initialized){
++decpar.frameNumber;
- if(cres&0xFFFF){
+ if(cres) {
mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"ImageCodecBandDecompress cres=0x%X (-0x%X) %d\n",cres,-cres,cres);
return NULL;
}
diff --git a/libmpcodecs/ve_qtvideo.c b/libmpcodecs/ve_qtvideo.c
index 94bd109d8b..a6773e31ca 100644
--- a/libmpcodecs/ve_qtvideo.c
+++ b/libmpcodecs/ve_qtvideo.c
@@ -69,7 +69,7 @@ static OSErr (*QTNewGWorldFromPtr)(GWorldPtr *gw,
GWorldFlags flags,
void *baseAddr,
long rowBytes);
-static OSErr (*NewHandleClear)(Size byteCount);
+static Handle (*NewHandleClear)(Size byteCount);
static OSErr (*CompressSequenceBegin) (
ImageSequence *seqID,
PixMapHandle src,