[SCM] libav/experimental: Replace "signed short" typecast with "int16_t" as suggested by Mans Rullgard. Value at the right side is 16 bit length signed. We can not know for sure that short is in fact 16 bits, even if this virtually always is the case.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:07:53 UTC 2013


The following commit has been merged in the experimental branch:
commit 94d9633a329ef411466b7637ab25725dcb6dc7b8
Author: Vladimir Voroshilov <voroshil at gmail.com>
Date:   Thu Oct 4 15:13:42 2007 +0000

    Replace "signed short" typecast with "int16_t" as suggested by
    Mans Rullgard. Value at the right side is 16 bit length signed.
    We can not know for sure that short is in fact 16 bits, even if
    this virtually always is the case.
    
    Originally committed as revision 10666 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 21830ff..00eb818 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -1184,7 +1184,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
         break;
     case CODEC_ID_ADPCM_IMA_AMV:
     case CODEC_ID_ADPCM_IMA_SMJPEG:
-        c->status[0].predictor = (signed short)bytestream_get_le16(&src);
+        c->status[0].predictor = (int16_t)bytestream_get_le16(&src);
         c->status[0].step_index = bytestream_get_le16(&src);
 
         if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV)

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list