dxv: Support the original first version
authorVittorio Giovara <vittorio.giovara@gmail.com>
Tue, 22 Sep 2015 11:57:57 +0000 (13:57 +0200)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Thu, 24 Sep 2015 08:57:20 +0000 (10:57 +0200)
DXV 1.0 provided DXT1 with LZF only.

Sample-Id: Orange-Strings-07_640_DXV.mov
Reported-by: Carl Eugen Hoyos
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
libavcodec/dxv.c

index 22148a9..df2b6c6 100644 (file)
@@ -358,7 +358,7 @@ static int dxv_decode(AVCodecContext *avctx, void *data,
             av_log(avctx, AV_LOG_DEBUG, "LZF compression and DXT5 texture ");
             ctx->tex_funct = ctx->texdsp.dxt5_block;
             ctx->tex_step  = 16;
-        } else if (old_type & 0x20) {
+        } else if (old_type & 0x20 || version_major == 1) {
             av_log(avctx, AV_LOG_DEBUG, "LZF compression and DXT1 texture ");
             ctx->tex_funct = ctx->texdsp.dxt1_block;
             ctx->tex_step  = 8;