]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/rl2.c
lavc: clarify get_buffer() documentation
[ffmpeg] / libavcodec / rl2.c
index 9b21bb6c68f58c0bb6509fc4bfbcd476ec6a2157..84434a29a1bc0ec02881b9b23e068bc1da415cda 100644 (file)
@@ -30,7 +30,9 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "libavutil/internal.h"
 #include "libavutil/intreadwrite.h"
+#include "libavutil/mem.h"
 #include "avcodec.h"
 
 
@@ -64,7 +66,7 @@ static void rl2_rle_decode(Rl2Context *s,const unsigned char* in,int size,
     const unsigned char* back_frame = s->back_frame;
     const unsigned char* in_end = in + size;
     const unsigned char* out_end = out + stride * s->avctx->height;
-    unsigned char* line_end = out + s->avctx->width;
+    unsigned char* line_end;
 
     /** copy start of the background frame */
     for(i=0;i<=base_y;i++){
@@ -132,7 +134,7 @@ static av_cold int rl2_decode_init(AVCodecContext *avctx)
     int back_size;
     int i;
     s->avctx = avctx;
-    avctx->pix_fmt = PIX_FMT_PAL8;
+    avctx->pix_fmt = AV_PIX_FMT_PAL8;
 
     /** parse extra data */
     if(!avctx->extradata || avctx->extradata_size < EXTRADATA1_SIZE){
@@ -221,7 +223,7 @@ static av_cold int rl2_decode_end(AVCodecContext *avctx)
 AVCodec ff_rl2_decoder = {
     .name           = "rl2",
     .type           = AVMEDIA_TYPE_VIDEO,
-    .id             = CODEC_ID_RL2,
+    .id             = AV_CODEC_ID_RL2,
     .priv_data_size = sizeof(Rl2Context),
     .init           = rl2_decode_init,
     .close          = rl2_decode_end,