@@ -390,6 +390,18 @@ void VideoOutputVDPAU::ProcessFrame(VideoFrame *frame, OSD *osd,
390390 ShowPIPs (frame, pipPlayers);
391391}
392392
393+ void VideoOutputVDPAU::ClearDummyFrame (VideoFrame *frame)
394+ {
395+ if (frame && m_render && !codec_is_std (video_codec_id))
396+ {
397+ struct vdpau_render_state *render =
398+ (struct vdpau_render_state *)frame->buf ;
399+ if (render)
400+ m_render->ClearVideoSurface (render->surface );
401+ }
402+ VideoOutput::ClearDummyFrame (frame);
403+ }
404+
393405void VideoOutputVDPAU::PrepareFrame (VideoFrame *frame, FrameScanType scan,
394406 OSD *osd)
395407{
@@ -420,7 +432,8 @@ void VideoOutputVDPAU::PrepareFrame(VideoFrame *frame, FrameScanType scan,
420432 }
421433
422434 uint video_surface = m_video_surfaces[0 ];
423- bool deint = (m_deinterlacing && m_need_deintrefs && frame);
435+ bool deint = (m_deinterlacing && m_need_deintrefs &&
436+ frame && !dummy);
424437
425438 if (deint)
426439 {
@@ -491,19 +504,16 @@ void VideoOutputVDPAU::PrepareFrame(VideoFrame *frame, FrameScanType scan,
491504 if (size != m_render->GetSize ())
492505 LOG (VB_GENERAL, LOG_ERR, LOC + " Unexpected display size." );
493506
494- if (!dummy)
507+ if (!m_render->MixAndRend (m_video_mixer, field, video_surface, 0 ,
508+ deint ? &m_reference_frames : NULL ,
509+ scan == kScan_Interlaced ,
510+ window.GetVideoRect (),
511+ QRect (QPoint (0 ,0 ), size),
512+ vsz_enabled ? vsz_desired_display_rect :
513+ window.GetDisplayVideoRect (),
514+ m_pip_ready ? m_pip_layer : 0 , 0 ))
495515 {
496- if (!m_render->MixAndRend (m_video_mixer, field, video_surface, 0 ,
497- deint ? &m_reference_frames : NULL ,
498- scan == kScan_Interlaced ,
499- window.GetVideoRect (),
500- QRect (QPoint (0 ,0 ), size),
501- vsz_enabled ? vsz_desired_display_rect :
502- window.GetDisplayVideoRect (),
503- m_pip_ready ? m_pip_layer : 0 , 0 ))
504- {
505- LOG (VB_PLAYBACK, LOG_ERR, LOC + " Prepare frame failed." );
506- }
516+ LOG (VB_PLAYBACK, LOG_ERR, LOC + " Prepare frame failed." );
507517 }
508518
509519 if (m_visual)
0 commit comments