# HG changeset patch # User reimar # Date 1235817808 0 # Node ID 68893c41ae261cf1a3aed8f6f1415c563c793612 # Parent 5f24919c13efde08ceb59a98f03d974c2068dd50 Handle vdp_decoder_create failures better, in particular avoid unrelated error messages and retry creating a decoder. diff -r 5f24919c13ef -r 68893c41ae26 libvo/vo_vdpau.c --- a/libvo/vo_vdpau.c Sat Feb 28 10:06:52 2009 +0000 +++ b/libvo/vo_vdpau.c Sat Feb 28 10:43:28 2009 +0000 @@ -785,6 +785,11 @@ } 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);