]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/rawenc.c
ansi: remove an extra return
[ffmpeg] / libavcodec / rawenc.c
index e94b6a500b9ceaa87494b422198053ceff2ddfe7..3e607afda6770ce6c47ba60216d3925ae97b5123 100644 (file)
 
 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;