]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/targa.c
Fix compilation with libutvideo version 12.0.0
[ffmpeg] / libavcodec / targa.c
index 6bb05a93addb04ca020b4d6c802bb5f2f7226e5d..11a8f213fd6bb100cdd82ad242c967fe03c45a43 100644 (file)
@@ -178,7 +178,7 @@ static int decode_frame(AVCodecContext *avctx,
         return AVERROR_INVALIDDATA;
     }
 
-    if ((ret = av_image_check_size(w, h, 0, avctx)))
+    if ((ret = av_image_check_size(w, h, 0, avctx)) < 0)
         return ret;
     if (w != avctx->width || h != avctx->height)
         avcodec_set_dimensions(avctx, w, h);
@@ -200,6 +200,7 @@ static int decode_frame(AVCodecContext *avctx,
 
     if (colors) {
         int pal_size, pal_sample_size;
+
         switch (csize) {
         case 32: pal_sample_size = 4; break;
         case 24: pal_sample_size = 3; break;
@@ -267,7 +268,7 @@ static int decode_frame(AVCodecContext *avctx,
             line = dst;
             y = 0;
             do {
-                bytestream2_get_bufferu(&s->gb, line, img_size);
+                bytestream2_get_buffer(&s->gb, line, img_size);
                 line = advance_line(dst, line, stride, &y, h, interleave);
             } while (line);
         }