aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-19 16:44:58 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-19 16:44:58 +0000
commita47d7c03324122b0bc04b536dd496a27180550de (patch)
tree58d4b52f773d18fffc43a34af60f6e40be241603 /src
parent78a47758dba94287de090a0721d2f138f7a055b8 (diff)
downloadusdx-a47d7c03324122b0bc04b536dd496a27180550de.tar.gz
usdx-a47d7c03324122b0bc04b536dd496a27180550de.tar.xz
usdx-a47d7c03324122b0bc04b536dd496a27180550de.zip
the result of AVERROR_SIGN was wrong, just the wrong way round.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2386 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r--src/lib/ffmpeg/avcodec.pas5
-rw-r--r--src/lib/ffmpeg/avutil.pas5
2 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/ffmpeg/avcodec.pas b/src/lib/ffmpeg/avcodec.pas
index 066910a3..ab146964 100644
--- a/src/lib/ffmpeg/avcodec.pas
+++ b/src/lib/ffmpeg/avcodec.pas
@@ -4703,11 +4703,10 @@ const
* 1) shr 30: shifts the sign bit to bit position 2
* 2) and $00000002: sets all other bits to zero
* positive EINVAL gives 0, negative gives 2
- * 3) not: inverts all bits. This gives -1 and -3
- * 4) + 2: positive EINVAL gives 1, negative -1
+ * 3) - 1: positive EINVAL gives -1, negative 1
*)
const
- AVERROR_SIGN = not((EINVAL shr 30) and $00000002) + 2;
+ AVERROR_SIGN = (EINVAL shr 30) and $00000002 - 1;
(*
#if EINVAL > 0
diff --git a/src/lib/ffmpeg/avutil.pas b/src/lib/ffmpeg/avutil.pas
index 959e8fda..28669161 100644
--- a/src/lib/ffmpeg/avutil.pas
+++ b/src/lib/ffmpeg/avutil.pas
@@ -199,11 +199,10 @@ const
* 1) shr 30: shifts the sign bit to bit position 2
* 2) and $00000002: sets all other bits to zero
* positive EINVAL gives 0, negative gives 2
- * 3) not: inverts all bits. This gives -1 and -3
- * 4) + 2: positive EINVAL gives 1, negative -1
+ * 3) - 1: positive EINVAL gives -1, negative 1
*)
const
- AVERROR_SIGN = not((EINVAL shr 30) and $00000002) + 2;
+ AVERROR_SIGN = (EINVAL shr 30) and $00000002 - 1;
(*
#if EINVAL > 0