diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-12 16:48:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-12 16:48:26 +0200 |
commit | af7dd79a323090b14a7fb9ef24a3f6a24dc6d2db (patch) | |
tree | ca68b14693edd87a495f00e759f06d5eafe0eafb /libavcodec/utils.c | |
parent | 3d179edf6d2a987e7eb134eea541954338a19add (diff) | |
parent | 50ba57e0ce63d9904269ea0728936a0c79f8bfb5 (diff) | |
download | ffmpeg-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/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 166b3b43a2..183776a09c 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -289,7 +289,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; @@ -486,7 +487,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); |