diff options
author | Tom Butterworth <bangnoise@gmail.com> | 2015-10-23 14:40:16 +0200 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-10-25 22:48:04 +0100 |
commit | 9f5d6f460ceeda8b4ac29b3249a49e275b64c706 (patch) | |
tree | bc875fd3bec76858912bff798ca77f7c550f101f | |
parent | fe66671bd5f446f8d0a9c70968ba8fe891efe028 (diff) | |
download | ffmpeg-9f5d6f460ceeda8b4ac29b3249a49e275b64c706.tar.gz |
hap: Set avctx.bits_per_coded_sample
Fixes an issue where alpha is ignored in some players.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
-rw-r--r-- | libavcodec/hapenc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/hapenc.c b/libavcodec/hapenc.c index 4a31447c9e..9ebad4a630 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: |