summaryrefslogtreecommitdiff
path: root/libavcodec/hapdec.c
diff options
context:
space:
mode:
authorTom Butterworth <bangnoise@gmail.com>2015-07-21 01:12:11 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-21 14:54:25 +0200
commit5d0616ce0e640383904615f1d09cae21446124bb (patch)
tree8c1160d6cd047a5546fefa133da3d6f03d88f261 /libavcodec/hapdec.c
parentb50910e9a9cf6a939125157e3231696a69838de6 (diff)
downloadffmpeg-5d0616ce0e640383904615f1d09cae21446124bb.tar.gz
avcodec/hapdec: log reason for failure when texture type doesn't match stream
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/hapdec.c')
-rw-r--r--libavcodec/hapdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c
index f55d4b77dc..8e90904b95 100644
--- a/libavcodec/hapdec.c
+++ b/libavcodec/hapdec.c
@@ -79,8 +79,10 @@ static int setup_texture(AVCodecContext *avctx, size_t length)
if ((avctx->codec_tag == MKTAG('H','a','p','1') && (ctx->section_type & 0x0F) != HAP_FMT_RGBDXT1)
|| (avctx->codec_tag == MKTAG('H','a','p','5') && (ctx->section_type & 0x0F) != HAP_FMT_RGBADXT5)
- || (avctx->codec_tag == MKTAG('H','a','p','Y') && (ctx->section_type & 0x0F) != HAP_FMT_YCOCGDXT5))
+ || (avctx->codec_tag == MKTAG('H','a','p','Y') && (ctx->section_type & 0x0F) != HAP_FMT_YCOCGDXT5)) {
+ av_log(avctx, AV_LOG_ERROR, "Invalid texture format %#04x.\n", ctx->section_type & 0x0F);
return AVERROR_INVALIDDATA;
+ }
switch (ctx->section_type & 0xF0) {
case HAP_COMP_NONE: