From 6f9d46539bce25828e3229db6cd9c0dbae1f3e11 Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期日, 19 一月 2020 11:43:34 +0800
Subject: [PATCH] update ffmpeg

---
 csrc/thirdparty/ffmpeg/include/libavutil/lfg.h |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/csrc/thirdparty/ffmpeg/include/libavutil/lfg.h b/csrc/thirdparty/ffmpeg/include/libavutil/lfg.h
index 03f779a..2b66920 100644
--- a/csrc/thirdparty/ffmpeg/include/libavutil/lfg.h
+++ b/csrc/thirdparty/ffmpeg/include/libavutil/lfg.h
@@ -24,6 +24,12 @@
 
 #include <stdint.h>
 
+/**
+ * Context structure for the Lagged Fibonacci PRNG.
+ * The exact layout, types and content of this struct may change and should
+ * not be accessed directly. Only its sizeof() is guranteed to stay the same
+ * to allow easy instanciation.
+ */
 typedef struct AVLFG {
     unsigned int state[64];
     int index;
@@ -45,8 +51,9 @@
  * it may be good enough and faster for your specific use case.
  */
 static inline unsigned int av_lfg_get(AVLFG *c){
-    c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63];
-    return c->state[c->index++ & 63];
+    unsigned a = c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63];
+    c->index += 1U;
+    return a;
 }
 
 /**
@@ -57,7 +64,9 @@
 static inline unsigned int av_mlfg_get(AVLFG *c){
     unsigned int a= c->state[(c->index-55) & 63];
     unsigned int b= c->state[(c->index-24) & 63];
-    return c->state[c->index++ & 63] = 2*a*b+a+b;
+    a = c->state[c->index & 63] = 2*a*b+a+b;
+    c->index += 1U;
+    return a;
 }
 
 /**

--
Gitblit v1.8.0