summaryrefslogtreecommitdiffstats
path: root/libvo/vosub_vidix.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-31 11:50:59 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-31 11:50:59 +0000
commitaf79d7fa53fbac8d49c43edc9a3b0cc272f82c16 (patch)
treedfb984b777b584bdf365ecbf2aa4a34e47635c70 /libvo/vosub_vidix.c
parentc97dccacbd3a56e65545e9b88a22c2d96ef48add (diff)
downloadmpv-af79d7fa53fbac8d49c43edc9a3b0cc272f82c16.tar.bz2
mpv-af79d7fa53fbac8d49c43edc9a3b0cc272f82c16.tar.xz
return error if unknown depth given. more informative error messages. dont exit if draw_frame was called with Planar YUV, only warn the user
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4443 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vosub_vidix.c')
-rw-r--r--libvo/vosub_vidix.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c
index f40cd57d38..b7848bf9a4 100644
--- a/libvo/vosub_vidix.c
+++ b/libvo/vosub_vidix.c
@@ -86,7 +86,7 @@ int vidix_preinit(const char *drvname,void *server)
printf("vosub_vidix: Couldn't get capability: %s\n",strerror(err));
return -1;
}
- printf("vosub_vidix: Using: %s\n",vidix_cap.name);
+ printf("vosub_vidix: Using: %s by %s\n",vidix_cap.name,vidix_cap.author);
/* we are able to tune up this stuff depend on fourcc format */
((vo_functions_t *)server)->draw_slice=vidix_draw_slice;
((vo_functions_t *)server)->draw_frame=vidix_draw_frame;
@@ -133,20 +133,24 @@ int vidix_init(unsigned src_width,unsigned src_height,
case 16:err = ((vidix_fourcc.depth & VID_DEPTH_16BPP) != VID_DEPTH_16BPP); break;
case 24:err = ((vidix_fourcc.depth & VID_DEPTH_24BPP) != VID_DEPTH_24BPP); break;
case 32:err = ((vidix_fourcc.depth & VID_DEPTH_32BPP) != VID_DEPTH_32BPP); break;
+ default: err = 1; break;
}
if(err)
{
- printf("vosub_vidix: video server has unsupported color depth by vidix\n");
+ printf("vosub_vidix: video server has unsupported color depth by vidix (%d)\n",
+ vidix_fourcc.depth);
return -1;
}
if((dst_width > src_width || dst_height > src_height) && (vidix_cap.flags & FLAG_UPSCALER) != FLAG_UPSCALER)
{
- printf("vosub_vidix: vidix driver can't upscale image\n");
+ printf("vosub_vidix: vidix driver can't upscale image (%dx%d -> %dx%d)\n",
+ src_width, src_height, dst_width, dst_height);
return -1;
}
if((dst_width > src_width || dst_height > src_height) && (vidix_cap.flags & FLAG_DOWNSCALER) != FLAG_DOWNSCALER)
{
- printf("vosub_vidix: vidix driver can't downscale image\n");
+ printf("vosub_vidix: vidix driver can't downscale image (%dx%d -> %dx%d)\n",
+ src_width, src_height, dst_width, dst_height);
return -1;
}
image_width = src_width;
@@ -438,9 +442,7 @@ uint32_t vidix_draw_frame(uint8_t *image[])
/* Note it's very strange but sometime for YUY2 draw_frame is called */
if(src_format == IMGFMT_YV12 || src_format == IMGFMT_I420 || src_format == IMGFMT_IYUV)
{
- printf("vosub_vidix: draw_frame for YUV420 called\nExiting...\n");
- vidix_term();
- exit( EXIT_FAILURE );
+ printf("vosub_vidix: draw_frame for YUV420 called, frame cannot be written\n");
}
else
if(src_format == IMGFMT_RGB32 || src_format == IMGFMT_BGR32)