]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pcx.c
Export av_strtod() to eval.h.
[ffmpeg] / libavcodec / pcx.c
index 785f715b54bc019d63bfdb410eaec3ed1138cfd2..43d7a5a028e243df022861f587ca32b91c7e2f72 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "avcodec.h"
 #include "bytestream.h"
-#include "bitstream.h"
+#include "get_bits.h"
 
 typedef struct PCXContext {
     AVFrame picture;
@@ -42,7 +42,7 @@ static av_cold int pcx_init(AVCodecContext *avctx) {
 /**
  * @return advanced src pointer
  */
-static const char *pcx_rle_decode(const uint8_t *src, uint8_t *dst,
+static const uint8_t *pcx_rle_decode(const uint8_t *src, uint8_t *dst,
                             unsigned int bytes_per_scanline) {
     unsigned int i = 0;
     unsigned char run, value;
@@ -70,7 +70,9 @@ static void pcx_palette(const uint8_t **src, uint32_t *dst, unsigned int pallen)
 }
 
 static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-                            const uint8_t *buf, int buf_size) {
+                            AVPacket *avpkt) {
+    const uint8_t *buf = avpkt->data;
+    int buf_size = avpkt->size;
     PCXContext * const s = avctx->priv_data;
     AVFrame *picture = data;
     AVFrame * const p = &s->picture;
@@ -242,7 +244,7 @@ AVCodec pcx_decoder = {
     NULL,
     pcx_end,
     pcx_decode_frame,
-    0,
+    CODEC_CAP_DR1,
     NULL,
-    .long_name = "PC Paintbrush PCX image",
+    .long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"),
 };