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/rawdec.c | |
parent | 9953ff3cd844eb5f6d8dfce98cad94b78a0fc7dc (diff) | |
download | ffmpeg-50ba57e0ce63d9904269ea0728936a0c79f8bfb5.tar.gz |
lavc: do not use av_pix_fmt_descriptors directly.
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r-- | libavcodec/rawdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index 4d12077676..0f47e3f96d 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -119,6 +119,7 @@ static int raw_decode(AVCodecContext *avctx, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; RawVideoContext *context = avctx->priv_data; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); int res; AVFrame *frame = data; @@ -161,7 +162,7 @@ static int raw_decode(AVCodecContext *avctx, avctx->width, avctx->height)) < 0) return res; if((avctx->pix_fmt==AV_PIX_FMT_PAL8 && buf_size < context->length) || - (av_pix_fmt_descriptors[avctx->pix_fmt].flags & PIX_FMT_PSEUDOPAL)) { + (desc->flags & PIX_FMT_PSEUDOPAL)) { frame->data[1]= context->palette; } if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { |