utvideodec: Set colorspace by codec_tag.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
This commit is contained in:
Yusuke Nakamura 2013-06-09 00:16:27 +09:00 committed by Kostya Shishkov
parent 2578f1efd6
commit 252ee3d39b
1 changed files with 4 additions and 0 deletions

View File

@ -511,18 +511,22 @@ static av_cold int decode_init(AVCodecContext *avctx)
case MKTAG('U', 'L', 'Y', '0'):
c->planes = 3;
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
avctx->colorspace = AVCOL_SPC_BT470BG;
break;
case MKTAG('U', 'L', 'Y', '2'):
c->planes = 3;
avctx->pix_fmt = AV_PIX_FMT_YUV422P;
avctx->colorspace = AVCOL_SPC_BT470BG;
break;
case MKTAG('U', 'L', 'H', '0'):
c->planes = 3;
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
avctx->colorspace = AVCOL_SPC_BT709;
break;
case MKTAG('U', 'L', 'H', '2'):
c->planes = 3;
avctx->pix_fmt = AV_PIX_FMT_YUV422P;
avctx->colorspace = AVCOL_SPC_BT709;
break;
default:
av_log(avctx, AV_LOG_ERROR, "Unknown Ut Video FOURCC provided (%08X)\n",