~ubuntu-branches/ubuntu/utopic/libav/utopic-proposed

« back to all changes in this revision

Viewing changes to libavcodec/xwddec.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler, Reinhard Tartler, Rico Tzschichholz
  • Date: 2014-08-30 11:02:45 UTC
  • mfrom: (1.3.47 sid)
  • Revision ID: package-import@ubuntu.com-20140830110245-io3dg7q85wfr7125
Tags: 6:11~beta1-2
[ Reinhard Tartler ]
* Make libavcodec-dev depend on libavresample-dev

[ Rico Tzschichholz ]
* Some fixes and leftovers from soname bumps

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
21
 */
22
22
 
 
23
#include <inttypes.h>
 
24
 
23
25
#include "libavutil/imgutils.h"
24
26
#include "avcodec.h"
25
27
#include "bytestream.h"
75
77
    ncolors       = bytestream2_get_be32u(&gb);
76
78
    bytestream2_skipu(&gb, header_size - (XWD_HEADER_SIZE - 20));
77
79
 
78
 
    av_log(avctx, AV_LOG_DEBUG, "pixformat %d, pixdepth %d, bunit %d, bitorder %d, bpad %d\n",
 
80
    av_log(avctx, AV_LOG_DEBUG,
 
81
           "pixformat %"PRIu32", pixdepth %"PRIu32", bunit %"PRIu32", bitorder %"PRIu32", bpad %"PRIu32"\n",
79
82
           pixformat, pixdepth, bunit, bitorder, bpad);
80
 
    av_log(avctx, AV_LOG_DEBUG, "vclass %d, ncolors %d, bpp %d, be %d, lsize %d, xoffset %d\n",
 
83
    av_log(avctx, AV_LOG_DEBUG,
 
84
           "vclass %"PRIu32", ncolors %"PRIu32", bpp %"PRIu32", be %"PRIu32", lsize %"PRIu32", xoffset %"PRIu32"\n",
81
85
           vclass, ncolors, bpp, be, lsize, xoffset);
82
 
    av_log(avctx, AV_LOG_DEBUG, "red %0x, green %0x, blue %0x\n", rgb[0], rgb[1], rgb[2]);
 
86
    av_log(avctx, AV_LOG_DEBUG,
 
87
           "red %0"PRIx32", green %0"PRIx32", blue %0"PRIx32"\n",
 
88
           rgb[0], rgb[1], rgb[2]);
83
89
 
84
90
    if (pixformat > XWD_Z_PIXMAP) {
85
91
        av_log(avctx, AV_LOG_ERROR, "invalid pixmap format\n");
92
98
    }
93
99
 
94
100
    if (xoffset) {
95
 
        avpriv_request_sample(avctx, "xoffset %d", xoffset);
 
101
        avpriv_request_sample(avctx, "xoffset %"PRIu32"", xoffset);
96
102
        return AVERROR_PATCHWELCOME;
97
103
    }
98
104
 
141
147
    }
142
148
 
143
149
    if (pixformat != XWD_Z_PIXMAP) {
144
 
        av_log(avctx, AV_LOG_ERROR, "pixmap format %d unsupported\n", pixformat);
 
150
        av_log(avctx, AV_LOG_ERROR, "pixmap format %"PRIu32" unsupported\n", pixformat);
145
151
        return AVERROR_PATCHWELCOME;
146
152
    }
147
153
 
193
199
 
194
200
    if (avctx->pix_fmt == AV_PIX_FMT_NONE) {
195
201
        avpriv_request_sample(avctx,
196
 
                              "Unknown file: bpp %d, pixdepth %d, vclass %d",
 
202
                              "Unknown file: bpp %"PRIu32", pixdepth %"PRIu32", vclass %"PRIu32"",
197
203
                              bpp, pixdepth, vclass);
198
204
        return AVERROR_PATCHWELCOME;
199
205
    }