From 5437a538d5302af25a175f71dcba746aa1cd086a Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 28 Feb 2009 10:43:28 +0000 Subject: Handle vdp_decoder_create failures better, in particular avoid unrelated error messages and retry creating a decoder. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28758 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_vdpau.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libvo') diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c index e81ff8ece0..259757d34a 100644 --- a/libvo/vo_vdpau.c +++ b/libvo/vo_vdpau.c @@ -785,6 +785,11 @@ static int draw_slice(uint8_t *image[], int stride[], int w, int h, } vdp_st = vdp_decoder_create(vdp_device, vdp_decoder_profile, vid_width, vid_height, max_refs, &decoder); CHECK_ST_WARNING("Failed creating VDPAU decoder"); + if (vdp_st != VDP_STATUS_OK) { + decoder = VDP_INVALID_HANDLE; + decoder_max_refs = 0; + return VO_FALSE; + } decoder_max_refs = max_refs; } vdp_st = vdp_decoder_render(decoder, rndr->surface, (void *)&rndr->info, rndr->bitstream_buffers_used, rndr->bitstream_buffers); -- cgit v1.2.3