]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ptx.c
use lzw compression in gif encoder
[ffmpeg] / libavcodec / ptx.c
index 2ab45b08a7c4b0eeae6ed7903b31714b332aca3c..f5aa601cde5c2da1f7c7d045759026f0598b88cf 100644 (file)
@@ -36,7 +36,8 @@ static av_cold int ptx_init(AVCodecContext *avctx) {
 }
 
 static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-                            const uint8_t *buf, int buf_size) {
+                            AVPacket *avpkt) {
+    const uint8_t *buf = avpkt->data;
     PTXContext * const s = avctx->priv_data;
     AVFrame *picture = data;
     AVFrame * const p = &s->picture;
@@ -78,7 +79,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     stride = p->linesize[0];
 
     for (y=0; y<h; y++) {
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
         unsigned int x;
         for (x=0; x<w*bytes_per_pixel; x+=bytes_per_pixel)
             AV_WN16(ptr+x, AV_RL16(buf+x));
@@ -113,7 +114,7 @@ AVCodec ptx_decoder = {
     NULL,
     ptx_end,
     ptx_decode_frame,
-    0,
+    CODEC_CAP_DR1,
     NULL,
     .long_name = NULL_IF_CONFIG_SMALL("V.Flash PTX image"),
 };