aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-30 03:02:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-03-30 03:03:28 +0200
commit30e159366e8b928885ea15ad46d7af9b871290a3 (patch)
treeeb611fc72bd2fd5a1ab85bb8f626b5de621ab86b /libavcodec
parentae3313e1548641e3b4a61520e119729a8b61e061 (diff)
parent508a84e6726ab94a740c160b30fd8162265d1fef (diff)
downloadffmpeg-30e159366e8b928885ea15ad46d7af9b871290a3.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: golomb: Fix the implementation of get_se_golomb_long Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/golomb.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
index 22c2d64030..1c4e2106ee 100644
--- a/libavcodec/golomb.h
+++ b/libavcodec/golomb.h
@@ -219,9 +219,9 @@ static inline int get_se_golomb_long(GetBitContext *gb)
unsigned int buf = get_ue_golomb_long(gb);
if (buf & 1)
- buf = -(buf >> 1);
+ buf = (buf + 1) >> 1;
else
- buf = (buf >> 1);
+ buf = -(buf >> 1);
return buf;
}