aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/xwdenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-12 16:48:26 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-12 16:48:26 +0200
commitaf7dd79a323090b14a7fb9ef24a3f6a24dc6d2db (patch)
treeca68b14693edd87a495f00e759f06d5eafe0eafb /libavcodec/xwdenc.c
parent3d179edf6d2a987e7eb134eea541954338a19add (diff)
parent50ba57e0ce63d9904269ea0728936a0c79f8bfb5 (diff)
downloadffmpeg-af7dd79a323090b14a7fb9ef24a3f6a24dc6d2db.tar.gz
Merge commit '50ba57e0ce63d9904269ea0728936a0c79f8bfb5'
* commit '50ba57e0ce63d9904269ea0728936a0c79f8bfb5': lavc: do not use av_pix_fmt_descriptors directly. Conflicts: libavcodec/imgconvert.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/mpegvideo.c libavcodec/rawdec.c libavcodec/rawenc.c libavcodec/tiffenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/xwdenc.c')
-rw-r--r--libavcodec/xwdenc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/xwdenc.c b/libavcodec/xwdenc.c
index 03391f1003..fac3d0ba1f 100644
--- a/libavcodec/xwdenc.c
+++ b/libavcodec/xwdenc.c
@@ -43,14 +43,15 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *p, int *got_packet)
{
enum AVPixelFormat pix_fmt = avctx->pix_fmt;
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
uint32_t pixdepth, bpp, bpad, ncolors = 0, lsize, vclass, be = 0;
uint32_t rgb[3] = { 0 }, bitorder = 0;
uint32_t header_size;
int i, out_size, ret;
uint8_t *ptr, *buf;
- pixdepth = av_get_bits_per_pixel(&av_pix_fmt_descriptors[pix_fmt]);
- if (av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_BE)
+ pixdepth = av_get_bits_per_pixel(desc);
+ if (desc->flags & PIX_FMT_BE)
be = 1;
switch (pix_fmt) {
case AV_PIX_FMT_ARGB: