summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Butterworth <bangnoise@gmail.com>2015-10-22 23:40:41 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-10-23 12:10:07 +0200
commita60539bb5e30d899c45c6ea9079f5b7669539f7a (patch)
tree0583a600c0cf97f5666b66b622ea7f3588a92ffc
parentca09eacbced651f1ccf514aa6031ca6b01fbd9c2 (diff)
avcodec/hap: set bits_per_coded_sample
fixes issue where alpha is ignored in some players Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/hapenc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/hapenc.c b/libavcodec/hapenc.c
index 7daadce254..cb5dcfac56 100644
--- a/libavcodec/hapenc.c
+++ b/libavcodec/hapenc.c
@@ -242,16 +242,19 @@ static av_cold int hap_init(AVCodecContext *avctx)
case HAP_FMT_RGBDXT1:
ratio = 8;
avctx->codec_tag = MKTAG('H', 'a', 'p', '1');
+ avctx->bits_per_coded_sample = 24;
ctx->tex_fun = ctx->dxtc.dxt1_block;
break;
case HAP_FMT_RGBADXT5:
ratio = 4;
avctx->codec_tag = MKTAG('H', 'a', 'p', '5');
+ avctx->bits_per_coded_sample = 32;
ctx->tex_fun = ctx->dxtc.dxt5_block;
break;
case HAP_FMT_YCOCGDXT5:
ratio = 4;
avctx->codec_tag = MKTAG('H', 'a', 'p', 'Y');
+ avctx->bits_per_coded_sample = 24;
ctx->tex_fun = ctx->dxtc.dxt5ys_block;
break;
default: