aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-10-12 15:13:42 +0000
committerPaul B Mahol <onemda@gmail.com>2012-10-12 15:31:42 +0000
commita51540d81167547f1c7c2b8f545c246711611071 (patch)
treeed001a8c92dbf84c5dcaf0f434cb9ccb4519a27e /libavcodec/ffv1.c
parent27ccc82e1bb1b97a85e5fb33b92082267078b4d1 (diff)
downloadandroid_external_ffmpeg-a51540d81167547f1c7c2b8f545c246711611071.tar.gz
android_external_ffmpeg-a51540d81167547f1c7c2b8f545c246711611071.tar.bz2
android_external_ffmpeg-a51540d81167547f1c7c2b8f545c246711611071.zip
lavc: do not use av_pix_fmt_descriptors directly
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r--libavcodec/ffv1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index c63a27f8aa..a09644eda4 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -916,6 +916,7 @@ static int sort_stt(FFV1Context *s, uint8_t stt[256]){
static av_cold int encode_init(AVCodecContext *avctx)
{
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
FFV1Context *s = avctx->priv_data;
int i, j, k, m;
@@ -983,7 +984,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
case AV_PIX_FMT_YUV420P:
case AV_PIX_FMT_YUV411P:
case AV_PIX_FMT_YUV410P:
- s->chroma_planes= av_pix_fmt_descriptors[avctx->pix_fmt].nb_components < 3 ? 0 : 1;
+ s->chroma_planes= desc->nb_components < 3 ? 0 : 1;
s->colorspace= 0;
break;
case AV_PIX_FMT_YUVA444P: