diff options
-rw-r--r-- | src/libvdpau/vdpau_mpeg12.c | 3 | ||||
-rw-r--r-- | src/libvdpau/vdpau_vc1.c | 3 |
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 ); |