[FFmpeg-cvslog] r20162 - trunk/libavcodec/sunrast.c
pross
subversion
Sun Oct 4 10:42:24 CEST 2009
Author: pross
Date: Sun Oct 4 10:42:23 2009
New Revision: 20162
Log:
Sun Raster RGB support
Modified:
trunk/libavcodec/sunrast.c
Modified: trunk/libavcodec/sunrast.c
==============================================================================
--- trunk/libavcodec/sunrast.c Sat Oct 3 21:40:52 2009 (r20161)
+++ trunk/libavcodec/sunrast.c Sun Oct 4 10:42:23 2009 (r20162)
@@ -64,7 +64,7 @@ static int sunrast_decode_frame(AVCodecC
maptype = AV_RB32(buf+24);
maplength = AV_RB32(buf+28);
- if (type > RT_BYTE_ENCODED && type <= RT_FORMAT_IFF) {
+ if (type == RT_FORMAT_TIFF || type == RT_FORMAT_IFF) {
av_log(avctx, AV_LOG_ERROR, "unsupported (compression) type\n");
return -1;
}
@@ -87,7 +87,7 @@ static int sunrast_decode_frame(AVCodecC
avctx->pix_fmt = PIX_FMT_PAL8;
break;
case 24:
- avctx->pix_fmt = PIX_FMT_BGR24;
+ avctx->pix_fmt = (type == RT_FORMAT_RGB) ? PIX_FMT_RGB24 : PIX_FMT_BGR24;
break;
default:
av_log(avctx, AV_LOG_ERROR, "invalid depth\n");
More information about the ffmpeg-cvslog
mailing list