diff options
author | Piotr Bandurski <ami_stuff@o2.pl> | 2012-05-19 02:07:45 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-20 16:29:07 +0200 |
commit | 718b90d4b939b09ea2c9996905edf3e482454023 (patch) | |
tree | 1712fb85bd63837cebfeb5c3a289125228c52291 /libavcodec | |
parent | cf9812d22b00eb135288e799698f63f0f2094aaf (diff) | |
download | ffmpeg-718b90d4b939b09ea2c9996905edf3e482454023.tar.gz |
aasc: support 16bpp
sample:
http://www.datafilehost.com/download-b881f3f6.html
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/aasc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c index 1e4264296d..db33eff5eb 100644 --- a/libavcodec/aasc.c +++ b/libavcodec/aasc.c @@ -43,7 +43,17 @@ static av_cold int aasc_decode_init(AVCodecContext *avctx) AascContext *s = avctx->priv_data; s->avctx = avctx; - avctx->pix_fmt = PIX_FMT_BGR24; + switch (avctx->bits_per_coded_sample) { + case 16: + avctx->pix_fmt = PIX_FMT_RGB555; + break; + case 24: + avctx->pix_fmt = PIX_FMT_BGR24; + break; + default: + av_log(avctx, AV_LOG_ERROR, "Unsupported bit depth: %d\n", avctx->bits_per_coded_sample); + return -1; + } avcodec_get_frame_defaults(&s->frame); return 0; |