summaryrefslogtreecommitdiff
path: root/libavcodec/rawdec.c
diff options
context:
space:
mode:
authorTomas Härdin <tomas.hardin@codemill.se>2010-06-10 08:39:05 +0000
committerTomas Härdin <tomas.hardin@codemill.se>2010-06-10 08:39:05 +0000
commitc1bdc9300b3c0b05d49a8a0e34a5249dfe1544f3 (patch)
treeb88ac3fbb69cf6100956e68393eab3e6fdcc95b3 /libavcodec/rawdec.c
parentbb5cfc48f1f95eacd093b447cca4a451c396905b (diff)
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 Originally committed as revision 23561 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r--libavcodec/rawdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index ab13bdc59e..ce1febbf94 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -77,7 +77,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
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);