[FFmpeg-cvslog] Fix condition for transparency warning in xsub encoder.

Carl Eugen Hoyos git at videolan.org
Mon Dec 30 02:25:45 CET 2013


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun Dec 29 23:18:10 2013 +0100| [de40905f55cdd668b50a143f8e30936d22a09a37] | committer: Carl Eugen Hoyos

Fix condition for transparency warning in xsub encoder.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=de40905f55cdd668b50a143f8e30936d22a09a37
---

 libavcodec/xsubenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/xsubenc.c b/libavcodec/xsubenc.c
index 53f4d6c..7070854 100644
--- a/libavcodec/xsubenc.c
+++ b/libavcodec/xsubenc.c
@@ -142,7 +142,7 @@ static int xsub_encode(AVCodecContext *avctx, unsigned char *buf,
         av_log(avctx, AV_LOG_WARNING, "No more than 4 subtitle colors supported (%d found.)\n", h->rects[0]->nb_colors);
 
     // TODO: Palette swapping if color zero is not transparent
-    if (((uint32_t *)h->rects[0]->pict.data[1])[0] & 0xff)
+    if (((uint32_t *)h->rects[0]->pict.data[1])[0] & 0xff000000)
         av_log(avctx, AV_LOG_WARNING, "Color index 0 is not transparent. Transparency will be messed up.\n");
 
     if (make_tc(startTime, start_tc) || make_tc(endTime, end_tc)) {



More information about the ffmpeg-cvslog mailing list