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/utils.c | |
parent | 9953ff3cd844eb5f6d8dfce98cad94b78a0fc7dc (diff) | |
download | ffmpeg-50ba57e0ce63d9904269ea0728936a0c79f8bfb5.tar.gz |
lavc: do not use av_pix_fmt_descriptors directly.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 48d63489bc..90afdd3031 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -247,7 +247,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height) { - int chroma_shift = av_pix_fmt_descriptors[s->pix_fmt].log2_chroma_w; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->pix_fmt); + int chroma_shift = desc->log2_chroma_w; int linesize_align[AV_NUM_DATA_POINTERS]; int align; @@ -422,7 +423,8 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic) int unaligned; AVPicture picture; int stride_align[AV_NUM_DATA_POINTERS]; - const int pixel_size = av_pix_fmt_descriptors[s->pix_fmt].comp[0].step_minus1 + 1; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->pix_fmt); + const int pixel_size = desc->comp[0].step_minus1 + 1; avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift); |