Ticket #2267: videoout_quartz.cpp.diff

File videoout_quartz.cpp.diff, 2.0 KB (added by awk@…, 18 years ago)

patch to videoout_quartz.cpp

  • videoout_quartz.cpp

     
    176176
    177177    thePort = NULL;
    178178    desiredWidth = desiredHeight = desiredXoff = desiredYoff = 0;
    179     theCodec = NULL;
     179    memset(&theCodec, 0, sizeof(theCodec));
    180180    theMask = NULL;
    181181
    182182    frameSkip = 1;
     
    272272    if (theCodec)
    273273    {
    274274        CDSequenceEnd(theCodec);
    275         theCodec = NULL;
     275        memset(&theCodec, 0, sizeof(theCodec));
    276276        if (theMask)
    277277        {
    278278            DisposeRgn(theMask);
     
    564564    (void)width;
    565565    (void)height;
    566566    (void)aspect;
    567 
     567        (void)av_codec_id;
     568       
    568569    // need to redo codec, but not the port
    569570    End();
    570571    Begin();
     
    12531254            QString("VideoOutputQuartz::GetRefreshRate() [returning %1]")
    12541255                   .arg((int)data->refreshRate));
    12551256
    1256     return (int)data->refreshRate;
     1257    return (int) 1000000 / data->refreshRate;
    12571258}
    12581259
    12591260bool VideoOutputQuartz::Init(int width, int height, float aspect,
     
    13281329    m = CGDisplayCurrentMode(data->screen);
    13291330    data->refreshRate = get_float_CF(m, kCGDisplayRefreshRate);
    13301331    if (data->refreshRate == 0.0)       // LCD display?
    1331         data->refreshRate = 150;
     1332        data->refreshRate = 60;
    13321333
    13331334    // Global configuration options
    13341335    data->scaleUpVideo = gContext->GetNumSetting("MacScaleUp", 1);
     
    14201421
    14211422bool VideoOutputQuartz::CreateQuartzBuffers(void)
    14221423{
    1423     for (int i = 0; i < vbuffers.allocSize(); i++)
     1424    for (unsigned int i = 0; i < vbuffers.allocSize(); i++)
    14241425    {
    14251426        vbuffers.at(i)->width  = video_dim.width();
    14261427        vbuffers.at(i)->height = video_dim.height();
     
    15601561    if (pauseFrame.buf)
    15611562        delete [] pauseFrame.buf;
    15621563
    1563     for (int i = 0; i < vbuffers.allocSize(); i++)
     1564    for (unsigned int i = 0; i < vbuffers.allocSize(); i++)
    15641565    {
    15651566        delete [] vbuffers.at(i)->buf;
    15661567        vbuffers.at(i)->buf = NULL;