Ticket #3125: disable_dvd_xvmc_if_codec_change_fails.diff

File disable_dvd_xvmc_if_codec_change_fails.diff, 1.7 KB (added by skamithi, 19 years ago)

disable xvmc for dvd if codec check fails, like the ticket submitter stated. i have a pc with intel graphics card. xvmc compiles but it doesn't support it. so it was a good pc to test out this code.

  • avformatdecoder.cpp

     
    13531353                        /* force_xv     */ force_xv);
    13541354                    bool vcd, idct, mc;
    13551355                    enc->codec_id = myth2av_codecid(mcid, vcd, idct, mc);
    1356                     if (ringBuffer->isDVD() && (mcid != video_codec_id))
    1357                         dvd_video_codec_changed = true;
     1356                    if (ringBuffer->isDVD() && (mcid == video_codec_id) &&
     1357                        dvd_video_codec_changed)
     1358                    {
     1359                        dvd_video_codec_changed = false;
     1360                        dvd_xvmc_enabled = false;
     1361                    }
    13581362                    video_codec_id = mcid;
    13591363                    if (!force_xv && kCodec_NORMAL_END < mcid && kCodec_STD_XVMC_END > mcid)
    13601364                    {
     
    28162820                int video_width = GetNVP()->GetVideoWidth();
    28172821                if (dvd_xvmc_enabled && GetNVP() && GetNVP()->getVideoOutput())
    28182822                {
    2819                     bool dvd_xvmc_active = GetNVP()->getVideoOutput()->hasMCAcceleration();
     2823                    bool dvd_xvmc_active = false;
     2824                    if (video_codec_id > kCodec_NORMAL_END &&
     2825                        video_codec_id < kCodec_STD_XVMC_END)
     2826                    {
     2827                        dvd_xvmc_active = true;
     2828                    }
     2829
    28202830                    bool indvdmenu   = ringBuffer->InDVDMenuOrStillFrame();
    28212831                    if ((indvdmenu && dvd_xvmc_active) ||
    28222832                        ((!indvdmenu && !dvd_xvmc_active)))