summaryrefslogtreecommitdiff
path: root/libavcodec/rawdec.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/rawdec.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/rawdec.c')
-rw-r--r--libavcodec/rawdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 98d49b30f2..d426f437f5 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -145,6 +145,7 @@ static int raw_decode(AVCodecContext *avctx,
int buf_size = avpkt->size;
int linesize_align = 4;
RawVideoContext *context = avctx->priv_data;
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
int res, len;
AVFrame *frame = data;
@@ -206,7 +207,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]= (uint8_t*)context->palette;
}
if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {