diff options
author | Julian Scheel <julian@jusst.de> | 2009-01-27 16:52:55 +0000 |
---|---|---|
committer | Julian Scheel <julian@jusst.de> | 2009-01-27 16:52:55 +0000 |
commit | 1b324731e2105519a22f8e37a315d0883a997a70 (patch) | |
tree | de6420593f1febd0b9183612a6f3b3f725a77a0f /src | |
parent | a3d246f8ff6bfc1748e5fdfbf24999a06b682960 (diff) | |
download | xine-lib-1b324731e2105519a22f8e37a315d0883a997a70.tar.gz xine-lib-1b324731e2105519a22f8e37a315d0883a997a70.tar.bz2 |
Fix pre-emption reinit in case an OSD was shown.
Diffstat (limited to 'src')
-rw-r--r-- | src/libvdpau/vdpau_h264.c | 3 | ||||
-rw-r--r-- | src/video_out/video_out_vdpau.c | 22 |
2 files changed, 22 insertions, 3 deletions
diff --git a/src/libvdpau/vdpau_h264.c b/src/libvdpau/vdpau_h264.c index ea9c3187c..16d8e3fb9 100644 --- a/src/libvdpau/vdpau_h264.c +++ b/src/libvdpau/vdpau_h264.c @@ -446,7 +446,8 @@ static int vdpau_decoder_render(video_decoder_t *this_gen, VdpBitstreamBuffer *v this->decoder = VDP_INVALID_HANDLE; vdpau_h264_reset(this_gen); this->vdp_runtime_nr = this->vdpau_accel->vdp_runtime_nr; - this->last_img = NULL; + img->free(img); + img = this->last_img = NULL; return 0; } diff --git a/src/video_out/video_out_vdpau.c b/src/video_out/video_out_vdpau.c index 780a308e9..241143bb9 100644 --- a/src/video_out/video_out_vdpau.c +++ b/src/video_out/video_out_vdpau.c @@ -788,6 +788,11 @@ static void vdpau_duplicate_frame_data (vo_frame_t *this_gen, vo_frame_t *origin return; } + if(orig->vdpau_accel_data.vdp_runtime_nr != this->vdpau_accel_data.vdp_runtime_nr) { + fprintf(stderr, "vdpau_duplicate_frame_data: called with invalid frame\n"); + return; + } + if (!(orig->flags & VO_CHROMA_422)) { this->vo_frame.pitches[0] = 8*((orig->vo_frame.width + 7) / 8); this->vo_frame.pitches[1] = 8*((orig->vo_frame.width + 15) / 16); @@ -1623,6 +1628,19 @@ static void vdpau_reinit( vo_driver_t *this_gen ) return; } + // osd overlays need to be recreated + this->overlay_output = VDP_INVALID_HANDLE; + this->overlay_output_width = this->overlay_output_height = 0; + this->overlay_unscaled = VDP_INVALID_HANDLE; + this->overlay_unscaled_width = this->overlay_unscaled_height = 0; + this->ovl_changed = 0; + this->has_overlay = 0; + this->has_unscaled = 0; + + this->argb_overlay = VDP_INVALID_HANDLE; + this->argb_overlay_width = this->argb_overlay_height = 0; + this->has_argb_overlay = 0; + this->video_mixer_chroma = chroma; VdpVideoMixerFeature features[] = { VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION, VDP_VIDEO_MIXER_FEATURE_SHARPNESS, VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL, VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL }; @@ -1639,10 +1657,10 @@ static void vdpau_reinit( vo_driver_t *this_gen ) vdp_preemption_callback_register(vdp_device, &vdp_preemption_callback, (void*)this); - XUnlockDisplay(guarded_display); - printf("vo_vdpau: Reinit done.\n"); this->vdp_runtime_nr++; this->reinit_needed = 0; + XUnlockDisplay(guarded_display); + printf("vo_vdpau: Reinit done.\n"); } |