Mercurial > mplayer.hg
comparison libvo/vo_vdpau.c @ 36322:d649e84ea8d5
Make VDPAU support work again with latest FFmpeg.
author | reimar |
---|---|
date | Sun, 11 Aug 2013 18:28:58 +0000 |
parents | 4e5239ebd43d |
children | 9de70162224b |
comparison
equal
deleted
inserted
replaced
36321:9c5b06130385 | 36322:d649e84ea8d5 |
---|---|
1007 | 1007 |
1008 static int draw_slice(uint8_t *image[], int stride[], int w, int h, | 1008 static int draw_slice(uint8_t *image[], int stride[], int w, int h, |
1009 int x, int y) | 1009 int x, int y) |
1010 { | 1010 { |
1011 VdpStatus vdp_st; | 1011 VdpStatus vdp_st; |
1012 struct vdpau_render_state *rndr = (struct vdpau_render_state *)image[0]; | 1012 struct vdpau_frame_data *rndr = (struct vdpau_frame_data *)image[0]; |
1013 int max_refs = image_format == IMGFMT_VDPAU_H264 ? rndr->info.h264.num_ref_frames : 2; | 1013 int max_refs = image_format == IMGFMT_VDPAU_H264 ? ((VdpPictureInfoH264 *)rndr->info)->num_ref_frames : 2; |
1014 | 1014 |
1015 if (handle_preemption() < 0) | 1015 if (handle_preemption() < 0) |
1016 return VO_TRUE; | 1016 return VO_TRUE; |
1017 | 1017 |
1018 if (!IMGFMT_IS_VDPAU(image_format)) | 1018 if (!IMGFMT_IS_VDPAU(image_format)) |
1019 return VO_FALSE; | 1019 return VO_FALSE; |
1020 if ((decoder == VDP_INVALID_HANDLE || decoder_max_refs < max_refs) | 1020 if ((decoder == VDP_INVALID_HANDLE || decoder_max_refs < max_refs) |
1021 && !create_vdp_decoder(image_format, vid_width, vid_height, max_refs)) | 1021 && !create_vdp_decoder(image_format, vid_width, vid_height, max_refs)) |
1022 return VO_FALSE; | 1022 return VO_FALSE; |
1023 | 1023 |
1024 vdp_st = vdp_decoder_render(decoder, rndr->surface, (void *)&rndr->info, rndr->bitstream_buffers_used, rndr->bitstream_buffers); | 1024 vdp_st = vdp_decoder_render(decoder, rndr->render_state->surface, rndr->info, rndr->bitstream_buffers_used, rndr->bitstream_buffers); |
1025 CHECK_ST_WARNING("Failed VDPAU decoder rendering"); | 1025 CHECK_ST_WARNING("Failed VDPAU decoder rendering"); |
1026 return VO_TRUE; | 1026 return VO_TRUE; |
1027 } | 1027 } |
1028 | 1028 |
1029 | 1029 |