[FFmpeg-cvslog] avfilter/f_perms: use the name 's' for the pointer to the private context

Ganesh Ajjanagadde git at videolan.org
Thu Sep 10 23:07:18 CEST 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Wed Sep  9 14:30:08 2015 -0400| [5064b0622412163c63893f714f880c22ff3ba18a] | committer: Paul B Mahol

avfilter/f_perms: use the name 's' for the pointer to the private context

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5064b0622412163c63893f714f880c22ff3ba18a
---

 libavfilter/f_perms.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavfilter/f_perms.c b/libavfilter/f_perms.c
index abe2e4f..40b8811 100644
--- a/libavfilter/f_perms.c
+++ b/libavfilter/f_perms.c
@@ -56,16 +56,16 @@ static const AVOption options[] = {
 
 static av_cold int init(AVFilterContext *ctx)
 {
-    PermsContext *perms = ctx->priv;
+    PermsContext *s = ctx->priv;
 
-    if (perms->mode == MODE_RANDOM) {
+    if (s->mode == MODE_RANDOM) {
         uint32_t seed;
 
-        if (perms->random_seed == -1)
-            perms->random_seed = av_get_random_seed();
-        seed = perms->random_seed;
+        if (s->random_seed == -1)
+            s->random_seed = av_get_random_seed();
+        seed = s->random_seed;
         av_log(ctx, AV_LOG_INFO, "random seed: 0x%08x\n", seed);
-        av_lfg_init(&perms->lfg, seed);
+        av_lfg_init(&s->lfg, seed);
     }
 
     return 0;
@@ -78,14 +78,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
 {
     int ret;
     AVFilterContext *ctx = inlink->dst;
-    PermsContext *perms = ctx->priv;
+    PermsContext *s = ctx->priv;
     AVFrame *out = frame;
     enum perm in_perm = av_frame_is_writable(frame) ? RW : RO;
     enum perm out_perm;
 
-    switch (perms->mode) {
+    switch (s->mode) {
     case MODE_TOGGLE:   out_perm = in_perm == RO ? RW : RO;                 break;
-    case MODE_RANDOM:   out_perm = av_lfg_get(&perms->lfg) & 1 ? RW : RO;   break;
+    case MODE_RANDOM:   out_perm = av_lfg_get(&s->lfg) & 1 ? RW : RO;       break;
     case MODE_RO:       out_perm = RO;                                      break;
     case MODE_RW:       out_perm = RW;                                      break;
     default:            out_perm = in_perm;                                 break;



More information about the ffmpeg-cvslog mailing list