summaryrefslogtreecommitdiff
path: root/src/libvdpau
diff options
context:
space:
mode:
authorChristophe Thommeret <hftom@free.fr>2009-02-19 23:48:50 +0000
committerChristophe Thommeret <hftom@free.fr>2009-02-19 23:48:50 +0000
commit88e51a20a8054d24abf2fe2e27ca35bc1adefdda (patch)
treee40b2cd3d1cd2873a3001f12b7f7632796d50e74 /src/libvdpau
parent27069809bf3dd57ab1006dda6ffdd10a7ae86687 (diff)
downloadxine-lib-88e51a20a8054d24abf2fe2e27ca35bc1adefdda.tar.gz
xine-lib-88e51a20a8054d24abf2fe2e27ca35bc1adefdda.tar.bz2
Fix pre-emption reinit.
Diffstat (limited to 'src/libvdpau')
-rw-r--r--src/libvdpau/vdpau_mpeg12.c3
-rw-r--r--src/libvdpau/vdpau_vc1.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libvdpau/vdpau_mpeg12.c b/src/libvdpau/vdpau_mpeg12.c
index dbcc77783..8141a202d 100644
--- a/src/libvdpau/vdpau_mpeg12.c
+++ b/src/libvdpau/vdpau_mpeg12.c
@@ -851,6 +851,7 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre
/* now check if vdpau has free decoder resource */
vo_frame_t *img = stream->video_out->get_frame( stream->video_out, 1920, 1080, 1, XINE_IMGFMT_VDPAU, VO_BOTH_FIELDS );
vdpau_accel_t *accel = (vdpau_accel_t*)img->accel_data;
+ int runtime_nr = accel->vdp_runtime_nr;
img->free(img);
VdpDecoder decoder;
VdpStatus st = accel->vdp_decoder_create( accel->vdp_device, VDP_DECODER_PROFILE_MPEG2_MAIN, 1920, 1080, 2, &decoder );
@@ -876,7 +877,7 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre
this->sequence.buf = (uint8_t*)malloc(this->sequence.bufsize);
this->sequence.forward_ref = 0;
this->sequence.backward_ref = 0;
- this->sequence.vdp_runtime_nr = 1;
+ this->sequence.vdp_runtime_nr = runtime_nr;
reset_sequence( &this->sequence );
this->sequence.ratio = 1;
diff --git a/src/libvdpau/vdpau_vc1.c b/src/libvdpau/vdpau_vc1.c
index fca537d2d..137b03d03 100644
--- a/src/libvdpau/vdpau_vc1.c
+++ b/src/libvdpau/vdpau_vc1.c
@@ -1073,6 +1073,7 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre
/* now check if vdpau has free decoder resource */
vo_frame_t *img = stream->video_out->get_frame( stream->video_out, 1920, 1080, 1, XINE_IMGFMT_VDPAU, VO_BOTH_FIELDS );
vdpau_accel_t *accel = (vdpau_accel_t*)img->accel_data;
+ int runtime_nr = accel->vdp_runtime_nr;
img->free(img);
VdpDecoder decoder;
VdpStatus st = accel->vdp_decoder_create( accel->vdp_device, VDP_DECODER_PROFILE_VC1_MAIN, 1920, 1080, 2, &decoder );
@@ -1098,7 +1099,7 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre
this->sequence.buf = (uint8_t*)malloc(this->sequence.bufsize);
this->sequence.forward_ref = 0;
this->sequence.backward_ref = 0;
- this->sequence.vdp_runtime_nr = 1;
+ this->sequence.vdp_runtime_nr = runtime_nr;
init_sequence( &this->sequence );
init_picture( &this->sequence.picture );