aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-10 04:46:00 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-10 04:46:00 +0200
commitb2583c2b62896a71db952e22bc34a22b30e82b6f (patch)
tree4a1654e97a102e43b360469ced9f71534663bb62
parentbd553941ae518cfcff24efae829ee9af55dcfb15 (diff)
parente0aa76d38a02090245284fc157afb9074e9ff073 (diff)
downloadffmpeg-b2583c2b62896a71db952e22bc34a22b30e82b6f.tar.gz
Merge commit 'e0aa76d38a02090245284fc157afb9074e9ff073' into release/2.2
* commit 'e0aa76d38a02090245284fc157afb9074e9ff073': golomb: Fix the implementation of get_se_golomb_long Merged-by: Michael Niedermayer <michaelni@gmx.at>
-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;
}