Ticket #1822: fix_for_latest_problem.2.diff

File fix_for_latest_problem.2.diff, 3.4 KB (added by skamithi, 17 years ago)

fix for latest problem doesn't work. made small correction. tested correction.. works for me.

  • libs/libmythtv/avformatdecoder.cpp

     
    10341034        GetNVP()->SetVideoParams(align_width, align_height, fps,
    10351035                                 keyframedist, aspect_ratio, kScan_Detect,
    10361036                                 dvd_video_codec_changed);
    1037         dvd_video_codec_changed = false;
    10381037    }
    10391038}
    10401039
     
    13931392                        /* force_xv     */ force_xv);
    13941393                    bool vcd, idct, mc;
    13951394                    enc->codec_id = myth2av_codecid(mcid, vcd, idct, mc);
    1396                     if (ringBuffer->isDVD() && (mcid != video_codec_id))
    1397                         dvd_video_codec_changed = true;
    13981395                    video_codec_id = mcid;
    13991396                    if (!force_xv && kCodec_NORMAL_END < mcid && kCodec_STD_XVMC_END > mcid)
    14001397                    {
     
    28512848            {
    28522849                int current_width = curstream->codec->width;
    28532850                int video_width = GetNVP()->GetVideoWidth();
    2854                 bool switch_to_xv = false;
    2855                 bool switch_to_xvmc = false;
    28562851                if (dvd_xvmc_enabled && GetNVP() && GetNVP()->getVideoOutput())
    28572852                {
    28582853                    bool dvd_xvmc_active = GetNVP()->getVideoOutput()->hasMCAcceleration();
    28592854                    bool indvdmenu   = ringBuffer->InDVDMenuOrStillFrame();
    2860                     if (indvdmenu && dvd_xvmc_active)
    2861                         switch_to_xv = true;
    2862                     else if (!indvdmenu && !dvd_xvmc_active)
    2863                         switch_to_xvmc = true;
     2855                    if ((indvdmenu && dvd_xvmc_active) ||
     2856                        ((!indvdmenu && !dvd_xvmc_active)))
     2857                    {
     2858                        VERBOSE(VB_PLAYBACK, LOC + QString("DVD Codec Change "
     2859                                    "indvdmenu %1 dvd_xvmc_active %2")
     2860                                .arg(indvdmenu).arg(dvd_xvmc_active));
     2861                        dvd_video_codec_changed = true;
     2862                    }
    28642863                }
    28652864               
    28662865                if ((video_width > 0 && video_width != current_width) ||
    2867                     switch_to_xv || switch_to_xvmc)
     2866                    dvd_video_codec_changed)
    28682867                {
    2869                     VERBOSE(VB_PLAYBACK, LOC + QString("DVD Stream/Codec Change"
    2870                                 "video_width %1 current_width %2"
    2871                                 "switch_to_xv %3 switch_to_xvmc %4")
     2868                    VERBOSE(VB_PLAYBACK, LOC + QString("DVD Stream/Codec Change "
     2869                                "video_width %1 current_width %2 "
     2870                                "dvd_video_codec_changed %3")
    28722871                            .arg(video_width).arg(current_width)
    2873                             .arg(switch_to_xv).arg(switch_to_xvmc));
     2872                            .arg(dvd_video_codec_changed));
    28742873                    av_free_packet(pkt);
    28752874                    CloseCodecs();
    28762875                    ScanStreams(false);
     
    28782877                    allowedquit = true;
    28792878                    if (ringBuffer->DVD()->InStillFrame())
    28802879                        ringBuffer->DVD()->SeekCellStart();
     2880                    dvd_video_codec_changed = false;
    28812881                    continue;
    28822882                }
    28832883            }