summaryrefslogtreecommitdiff
path: root/libavcodec/rawenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-10-06 13:29:37 +0200
committerAnton Khirnov <anton@khirnov.net>2012-10-12 12:45:39 +0200
commit50ba57e0ce63d9904269ea0728936a0c79f8bfb5 (patch)
tree9afffc3a86a692d3cf454ed883e835af7d0a3a4f /libavcodec/rawenc.c
parent9953ff3cd844eb5f6d8dfce98cad94b78a0fc7dc (diff)
lavc: do not use av_pix_fmt_descriptors directly.
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 e94b6a500b..3e607afda6 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;
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
avctx->coded_frame->key_frame = 1;
- 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;