summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-28 10:43:28 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-28 10:43:28 +0000
commit5437a538d5302af25a175f71dcba746aa1cd086a (patch)
treea001a984e710b1191f3a7e7a02f8e868897bf30d /libvo
parentd1acb189028448087cee36a78d0b64b024422966 (diff)
downloadmpv-5437a538d5302af25a175f71dcba746aa1cd086a.tar.bz2
mpv-5437a538d5302af25a175f71dcba746aa1cd086a.tar.xz
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
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_vdpau.c5
1 files changed, 5 insertions, 0 deletions
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);