Ticket #2267: videoout_quartz.cpp.diff
File videoout_quartz.cpp.diff, 2.0 KB (added by , 18 years ago) |
---|
-
videoout_quartz.cpp
176 176 177 177 thePort = NULL; 178 178 desiredWidth = desiredHeight = desiredXoff = desiredYoff = 0; 179 theCodec = NULL;179 memset(&theCodec, 0, sizeof(theCodec)); 180 180 theMask = NULL; 181 181 182 182 frameSkip = 1; … … 272 272 if (theCodec) 273 273 { 274 274 CDSequenceEnd(theCodec); 275 theCodec = NULL;275 memset(&theCodec, 0, sizeof(theCodec)); 276 276 if (theMask) 277 277 { 278 278 DisposeRgn(theMask); … … 564 564 (void)width; 565 565 (void)height; 566 566 (void)aspect; 567 567 (void)av_codec_id; 568 568 569 // need to redo codec, but not the port 569 570 End(); 570 571 Begin(); … … 1253 1254 QString("VideoOutputQuartz::GetRefreshRate() [returning %1]") 1254 1255 .arg((int)data->refreshRate)); 1255 1256 1256 return (int) data->refreshRate;1257 return (int) 1000000 / data->refreshRate; 1257 1258 } 1258 1259 1259 1260 bool VideoOutputQuartz::Init(int width, int height, float aspect, … … 1328 1329 m = CGDisplayCurrentMode(data->screen); 1329 1330 data->refreshRate = get_float_CF(m, kCGDisplayRefreshRate); 1330 1331 if (data->refreshRate == 0.0) // LCD display? 1331 data->refreshRate = 150;1332 data->refreshRate = 60; 1332 1333 1333 1334 // Global configuration options 1334 1335 data->scaleUpVideo = gContext->GetNumSetting("MacScaleUp", 1); … … 1420 1421 1421 1422 bool VideoOutputQuartz::CreateQuartzBuffers(void) 1422 1423 { 1423 for ( int i = 0; i < vbuffers.allocSize(); i++)1424 for (unsigned int i = 0; i < vbuffers.allocSize(); i++) 1424 1425 { 1425 1426 vbuffers.at(i)->width = video_dim.width(); 1426 1427 vbuffers.at(i)->height = video_dim.height(); … … 1560 1561 if (pauseFrame.buf) 1561 1562 delete [] pauseFrame.buf; 1562 1563 1563 for ( int i = 0; i < vbuffers.allocSize(); i++)1564 for (unsigned int i = 0; i < vbuffers.allocSize(); i++) 1564 1565 { 1565 1566 delete [] vbuffers.at(i)->buf; 1566 1567 vbuffers.at(i)->buf = NULL;