[MPlayer-dev-eng] [PATCH] CDDB support for OS/2

Diego Biurrun diego at biurrun.de
Fri Feb 19 10:54:52 CET 2010


On Fri, Feb 19, 2010 at 12:24:20PM +0900, KO Myung-Hun wrote:
> 
> This patch adds CDDB support for OS/2.
> 
> --- stream/stream_cddb.c	(revision 30605)
> +++ stream/stream_cddb.c	(working copy)
> @@ -66,6 +66,10 @@
>          #include <IOKit/storage/IOCDTypes.h>
>          #include <IOKit/storage/IOCDMediaBSDClient.h>
>  	#include "mpbswap.h"
> +#elif defined(__OS2__)
> +#define INCL_DOS
> +#define INCL_DOSDEVIOCTL
> +#include <os2.h>
>  #endif

Once again, this looks awfully familiar..

> @@ -108,6 +112,85 @@
> 
> +    if (rc) {
> +        mp_msg(MSGT_OPEN, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToReadTOC);
> +
> +        return -1;
> +    }

I'd drop the empty line.

> +        for (i = first; i <= last; i++) {
> +            if (i == last) {
> +                sDataTrack.bStartM = sDataDisk.bLeadOutM;
> +                sDataTrack.bStartS = sDataDisk.bLeadOutS;
> +                sDataTrack.bStartF = sDataDisk.bLeadOutF;
> +            }
> +            else {

} else {

> @@ -340,7 +423,7 @@
>  	sprintf( file_name, "%s%08lx", cddb_data->cache_dir, cddb_data->disc_id);
> 
>  	file_fd = open(file_name, O_RDONLY
> -#if defined(__MINGW32__) || defined(__CYGWIN__)
> +#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__)
>  	| O_BINARY
>  #endif

This looks like a candidate for a configure check.

Diego



More information about the MPlayer-dev-eng mailing list