]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/targaenc.c
Merge commit 'c9a39cec70603f662f4c326b21b11c4f0112079a'
[ffmpeg] / libavcodec / targaenc.c
index 89356b05b935c60c86a692e8e254fbb09b6d42a7..2f22e94785e7a61e91afc12281410af03417af33 100644 (file)
@@ -19,6 +19,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include <string.h>
+
+#include "libavutil/internal.h"
 #include "libavutil/intreadwrite.h"
 #include "libavutil/pixdesc.h"
 #include "avcodec.h"
@@ -116,7 +119,7 @@ static int targa_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         pkt->data[16] = 8;          /* bpp */
         break;
     case PIX_FMT_RGB555LE:
-        pkt->data[2]  = TGA_RGB;    /* uncompresses true-color image */
+        pkt->data[2]  = TGA_RGB;    /* uncompressed true-color image */
         avctx->bits_per_coded_sample =
         pkt->data[16] = 16;         /* bpp */
         break;
@@ -141,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);