[FFmpeg-cvslog] targaenc: Use named TGA_RLE constant instead of magic number

Bobby Bingham git at videolan.org
Tue Sep 18 10:45:34 CEST 2012


ffmpeg | branch: master | Bobby Bingham <uhmmmm at gmail.com> | Tue Sep 18 10:45:09 2012 +0200| [4aade44c4aea69ca40b926682f84635b1e84b47f] | committer: Carl Eugen Hoyos

targaenc: Use named TGA_RLE constant instead of magic number

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

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

diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c
index a7dce3a..2f22e94 100644
--- a/libavcodec/targaenc.c
+++ b/libavcodec/targaenc.c
@@ -144,7 +144,7 @@ static int targa_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 
     /* if that worked well, mark the picture as RLE compressed */
     if(datasize >= 0)
-        pkt->data[2] |= 8;
+        pkt->data[2] |= TGA_RLE;
 
     /* if RLE didn't make it smaller, go back to no compression */
     else datasize = targa_encode_normal(out, p, bpp, avctx->width, avctx->height);



More information about the ffmpeg-cvslog mailing list