]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/xwddec.c
cllc: Convert to the new bitstream reader
[ffmpeg] / libavcodec / xwddec.c
index eede5e5f4fb8a569982af92d529055b13f2eb5f6..387b697491ed8d75f45c70d0b2a814b247761b0e 100644 (file)
@@ -83,7 +83,9 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
     av_log(avctx, AV_LOG_DEBUG,
            "vclass %"PRIu32", ncolors %"PRIu32", bpp %"PRIu32", be %"PRIu32", lsize %"PRIu32", xoffset %"PRIu32"\n",
            vclass, ncolors, bpp, be, lsize, xoffset);
-    av_log(avctx, AV_LOG_DEBUG, "red %0x, green %0x, blue %0x\n", rgb[0], rgb[1], rgb[2]);
+    av_log(avctx, AV_LOG_DEBUG,
+           "red %0"PRIx32", green %0"PRIx32", blue %0"PRIx32"\n",
+           rgb[0], rgb[1], rgb[2]);
 
     if (pixformat > XWD_Z_PIXMAP) {
         av_log(avctx, AV_LOG_ERROR, "invalid pixmap format\n");
@@ -139,13 +141,13 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
         return AVERROR_INVALIDDATA;
     }
 
-    if (bytestream2_get_bytes_left(&gb) < ncolors * XWD_CMAP_SIZE + avctx->height * lsize) {
+    if (bytestream2_get_bytes_left(&gb) < ncolors * XWD_CMAP_SIZE + (uint64_t)avctx->height * lsize) {
         av_log(avctx, AV_LOG_ERROR, "input buffer too small\n");
         return AVERROR_INVALIDDATA;
     }
 
     if (pixformat != XWD_Z_PIXMAP) {
-        av_log(avctx, AV_LOG_ERROR, "pixmap format %"PRIu32" unsupported\n", pixformat);
+        avpriv_report_missing_feature(avctx, "Pixmap format %"PRIu32, pixformat);
         return AVERROR_PATCHWELCOME;
     }
 
@@ -246,5 +248,5 @@ AVCodec ff_xwd_decoder = {
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_XWD,
     .decode         = xwd_decode_frame,
-    .capabilities   = CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1,
 };