Mercurial > libavcodec.hg
diff rawdec.c @ 11861:f6a2af58f3e0 libavcodec
avcodec.h: Clarify AVCodecContext::pix_fmt documentation since its value may be set by the demuxer
rawdec.c: Only perform bits_per_coded_sample -> pix_fmt guesswork if pix_fmt hasn't been set
author | thardin |
---|---|
date | Thu, 10 Jun 2010 08:39:05 +0000 |
parents | 33498215b74f |
children | 46191b10d663 |
line wrap: on
line diff
--- a/rawdec.c Thu Jun 10 06:00:37 2010 +0000 +++ b/rawdec.c Thu Jun 10 08:39:05 2010 +0000 @@ -77,7 +77,7 @@ avctx->pix_fmt = find_pix_fmt(pix_fmt_bps_mov, avctx->bits_per_coded_sample); else if (avctx->codec_tag) avctx->pix_fmt = find_pix_fmt(ff_raw_pix_fmt_tags, avctx->codec_tag); - else if (avctx->bits_per_coded_sample) + else if (avctx->pix_fmt == PIX_FMT_NONE && avctx->bits_per_coded_sample) avctx->pix_fmt = find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample); context->length = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);