Ticket #1822: fix_for_latest_problem.2.diff
File fix_for_latest_problem.2.diff, 3.4 KB (added by , 17 years ago) |
---|
-
libs/libmythtv/avformatdecoder.cpp
1034 1034 GetNVP()->SetVideoParams(align_width, align_height, fps, 1035 1035 keyframedist, aspect_ratio, kScan_Detect, 1036 1036 dvd_video_codec_changed); 1037 dvd_video_codec_changed = false;1038 1037 } 1039 1038 } 1040 1039 … … 1393 1392 /* force_xv */ force_xv); 1394 1393 bool vcd, idct, mc; 1395 1394 enc->codec_id = myth2av_codecid(mcid, vcd, idct, mc); 1396 if (ringBuffer->isDVD() && (mcid != video_codec_id))1397 dvd_video_codec_changed = true;1398 1395 video_codec_id = mcid; 1399 1396 if (!force_xv && kCodec_NORMAL_END < mcid && kCodec_STD_XVMC_END > mcid) 1400 1397 { … … 2851 2848 { 2852 2849 int current_width = curstream->codec->width; 2853 2850 int video_width = GetNVP()->GetVideoWidth(); 2854 bool switch_to_xv = false;2855 bool switch_to_xvmc = false;2856 2851 if (dvd_xvmc_enabled && GetNVP() && GetNVP()->getVideoOutput()) 2857 2852 { 2858 2853 bool dvd_xvmc_active = GetNVP()->getVideoOutput()->hasMCAcceleration(); 2859 2854 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 } 2864 2863 } 2865 2864 2866 2865 if ((video_width > 0 && video_width != current_width) || 2867 switch_to_xv || switch_to_xvmc)2866 dvd_video_codec_changed) 2868 2867 { 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") 2872 2871 .arg(video_width).arg(current_width) 2873 .arg( switch_to_xv).arg(switch_to_xvmc));2872 .arg(dvd_video_codec_changed)); 2874 2873 av_free_packet(pkt); 2875 2874 CloseCodecs(); 2876 2875 ScanStreams(false); … … 2878 2877 allowedquit = true; 2879 2878 if (ringBuffer->DVD()->InStillFrame()) 2880 2879 ringBuffer->DVD()->SeekCellStart(); 2880 dvd_video_codec_changed = false; 2881 2881 continue; 2882 2882 } 2883 2883 }