diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-01-17 15:11:25 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-01-17 15:11:25 +0000 |
commit | 9a180390b9982713afa1b90934b588478b58a451 (patch) | |
tree | e5c636d045a5bd6dabc61a08d111ccc7f403c785 | |
parent | 1b5d46c6a690de8c6c206f599975d51b8c052770 (diff) | |
download | ffmpeg-9a180390b9982713afa1b90934b588478b58a451.tar.gz |
Factorize error message logging in rgb2rgbWrapper().
Originally committed as revision 30356 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
-rw-r--r-- | libswscale/swscale.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 832af8dc13..9f18a41a51 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2085,8 +2085,6 @@ static int rgb2rgbWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], case 0x83: conv= rgb15to32; break; case 0x84: conv= rgb16to32; break; case 0x86: conv= rgb24to32; break; - default: av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n", - sws_format_name(srcFormat), sws_format_name(dstFormat)); break; } } else if ( (isBGR(srcFormat) && isRGB(dstFormat)) || (isRGB(srcFormat) && isBGR(dstFormat))) { @@ -2107,15 +2105,13 @@ static int rgb2rgbWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], case 0x84: conv= rgb16tobgr32; break; case 0x86: conv= rgb24tobgr32; break; case 0x88: conv= rgb32tobgr32; break; - default: av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n", - sws_format_name(srcFormat), sws_format_name(dstFormat)); break; } - } else { - av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n", - sws_format_name(srcFormat), sws_format_name(dstFormat)); } - if(conv) { + if (!conv) { + av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n", + sws_format_name(srcFormat), sws_format_name(dstFormat)); + } else { const uint8_t *srcPtr= src[0]; if(srcFormat == PIX_FMT_RGB32_1 || srcFormat == PIX_FMT_BGR32_1) srcPtr += ALT32_CORR; |