avformat/dtsdec: fix signedness in reference pcm highpass in dts_probe()
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 2 Aug 2014 15:23:03 +0000 (17:23 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 2 Aug 2014 15:24:42 +0000 (17:24 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/dtsdec.c

index 227a02b..330c428 100644 (file)
@@ -59,7 +59,7 @@ static int dts_probe(AVProbeData *p)
                 markers[3]++;
 
         if (buf - p->buf >= 4)
-            diff += FFABS(AV_RL16(buf) - AV_RL16(buf-4));
+            diff += FFABS(((int16_t)AV_RL16(buf)) - (int16_t)AV_RL16(buf-4));
     }
     sum = markers[0] + markers[1] + markers[2] + markers[3];
     max = 0;