diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-10-06 13:29:37 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-10-12 12:45:39 +0200 |
commit | 50ba57e0ce63d9904269ea0728936a0c79f8bfb5 (patch) | |
tree | 9afffc3a86a692d3cf454ed883e835af7d0a3a4f /libavcodec/xwdenc.c | |
parent | 9953ff3cd844eb5f6d8dfce98cad94b78a0fc7dc (diff) | |
download | ffmpeg-50ba57e0ce63d9904269ea0728936a0c79f8bfb5.tar.gz |
lavc: do not use av_pix_fmt_descriptors directly.
Diffstat (limited to 'libavcodec/xwdenc.c')
-rw-r--r-- | libavcodec/xwdenc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/xwdenc.c b/libavcodec/xwdenc.c index a141e0839e..c9a2a5628f 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: |