summaryrefslogtreecommitdiff
path: root/libavcodec/rawenc.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/rawenc.c
parent3d179edf6d2a987e7eb134eea541954338a19add (diff)
parent50ba57e0ce63d9904269ea0728936a0c79f8bfb5 (diff)
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/rawenc.c')
-rw-r--r--libavcodec/rawenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c
index abc650e0ba..c6da6b8d89 100644
--- a/libavcodec/rawenc.c
+++ b/libavcodec/rawenc.c
@@ -33,10 +33,12 @@
static av_cold int raw_init_encoder(AVCodecContext *avctx)
{
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
+
avctx->coded_frame = avctx->priv_data;
avcodec_get_frame_defaults(avctx->coded_frame);
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->bits_per_coded_sample = av_get_bits_per_pixel(&av_pix_fmt_descriptors[avctx->pix_fmt]);
+ avctx->bits_per_coded_sample = av_get_bits_per_pixel(desc);
if(!avctx->codec_tag)
avctx->codec_tag = avcodec_pix_fmt_to_codec_tag(avctx->pix_fmt);
return 0;