comparison libvo/mga_common.c @ 26755:46f0b4d34fa1

cosmetics: Remove useless parentheses from from return statements.
author diego
date Fri, 16 May 2008 08:33:27 +0000
parents afa125da85cf
children 7b868c55d22b
comparison
equal deleted inserted replaced
26754:63630c09e237 26755:46f0b4d34fa1
366 case IMGFMT_UYVY: 366 case IMGFMT_UYVY:
367 mga_vid_config.frame_size = ((width + 31) & ~31) * height * 2; 367 mga_vid_config.frame_size = ((width + 31) & ~31) * height * 2;
368 mga_vid_config.format=MGA_VID_FORMAT_UYVY; break; 368 mga_vid_config.format=MGA_VID_FORMAT_UYVY; break;
369 default: 369 default:
370 mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_InvalidOutputFormat,format); 370 mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_InvalidOutputFormat,format);
371 return (-1); 371 return -1;
372 } 372 }
373 373
374 mga_vid_config.src_width = width; 374 mga_vid_config.src_width = width;
375 mga_vid_config.src_height= height; 375 mga_vid_config.src_height= height;
376 if(!mga_vid_config.dest_width) 376 if(!mga_vid_config.dest_width)
384 mga_vid_config.version=MGA_VID_VERSION; 384 mga_vid_config.version=MGA_VID_VERSION;
385 385
386 if(width > 1024 && height > 1024) 386 if(width > 1024 && height > 1024)
387 { 387 {
388 mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh); 388 mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh);
389 return (-1); 389 return -1;
390 } else if(height <= 1024) 390 } else if(height <= 1024)
391 { 391 {
392 // try whether we have a G550 392 // try whether we have a G550
393 int ret; 393 int ret;
394 if ((ret = ioctl(f,MGA_VID_CONFIG,&mga_vid_config))) 394 if ((ret = ioctl(f,MGA_VID_CONFIG,&mga_vid_config)))
395 { 395 {
396 if(mga_vid_config.card_type != MGA_G550) 396 if(mga_vid_config.card_type != MGA_G550)
397 { 397 {
398 // we don't have a G550, so our resolution is too high 398 // we don't have a G550, so our resolution is too high
399 mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh); 399 mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh);
400 return (-1); 400 return -1;
401 } else { 401 } else {
402 // there is a deeper problem 402 // there is a deeper problem
403 // we have a G550, but still couldn't configure mga_vid 403 // we have a G550, but still couldn't configure mga_vid
404 perror("Error in mga_vid_config ioctl()"); 404 perror("Error in mga_vid_config ioctl()");
405 mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_IncompatibleDriverVersion); 405 mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_IncompatibleDriverVersion);
455 f = open(devname,O_RDWR); 455 f = open(devname,O_RDWR);
456 if(f == -1) 456 if(f == -1)
457 { 457 {
458 perror("open"); 458 perror("open");
459 mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldntOpen,devname); 459 mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldntOpen,devname);
460 return(-1); 460 return -1;
461 } 461 }
462 462
463 #ifdef VO_XMGA 463 #ifdef VO_XMGA
464 if (!vo_init()) { 464 if (!vo_init()) {
465 close(f); 465 close(f);