Commit 9f5d6f46 authored by Tom Butterworth's avatar Tom Butterworth Committed by Vittorio Giovara

hap: Set avctx.bits_per_coded_sample

Fixes an issue where alpha is ignored in some players.
Signed-off-by: 's avatarVittorio Giovara <vittorio.giovara@gmail.com>
parent fe66671b
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment