]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/qtrle.c
Swap red and blue when decoding r210.
[ffmpeg] / libavcodec / qtrle.c
index 33a7eb57319f8aca62449b99e171a8855c8576d7..dcb76ecfe50ccc075840c70c285bc25d01588e04 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file qtrle.c
+ * @file libavcodec/qtrle.c
  * QT RLE Video Decoder by Mike Melanson (melanson@pcisys.net)
  * For more information about the QT RLE format, visit:
  *   http://www.pcisys.net/~melanson/codecs/
@@ -34,8 +34,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 
+#include "libavutil/intreadwrite.h"
 #include "avcodec.h"
 
 typedef struct QtrleContext {
@@ -423,8 +423,10 @@ static av_cold int qtrle_decode_init(AVCodecContext *avctx)
 
 static int qtrle_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;
     QtrleContext *s = avctx->priv_data;
     int header, start_line;
     int stream_ptr, height, row_ptr;