[FFmpeg-cvslog] hap: Set avctx.bits_per_coded_sample

Tom Butterworth git at videolan.org
Tue Oct 27 14:07:37 CET 2015


ffmpeg | branch: master | Tom Butterworth <bangnoise at gmail.com> | Fri Oct 23 14:40:16 2015 +0200| [9f5d6f460ceeda8b4ac29b3249a49e275b64c706] | committer: Vittorio Giovara

hap: Set avctx.bits_per_coded_sample

Fixes an issue where alpha is ignored in some players.

Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f5d6f460ceeda8b4ac29b3249a49e275b64c706
---

 libavcodec/hapenc.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/hapenc.c b/libavcodec/hapenc.c
index 4a31447..9ebad4a 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:



More information about the ffmpeg-cvslog mailing list