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
This commit is contained in:
reimar 2009-02-28 10:43:28 +00:00
parent d1acb18902
commit 5437a538d5
1 changed files with 5 additions and 0 deletions

View File

@ -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);