]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - libavcodec/pcx.c
Started attempt to fix seek handling - still not completed
[frescor/ffmpeg.git] / libavcodec / pcx.c
index 785f715b54bc019d63bfdb410eaec3ed1138cfd2..dde01bedf46d5f8f1e62d1acfbf1a9313c1ec458 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;
@@ -244,5 +246,5 @@ AVCodec pcx_decoder = {
     pcx_decode_frame,
     0,
     NULL,
-    .long_name = "PC Paintbrush PCX image",
+    .long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"),
 };