[FFmpeg-cvslog] avcodec/pthread_slice: Remove rets_count

Michael Niedermayer git at videolan.org
Thu Nov 26 01:10:02 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Nov 19 00:58:35 2015 +0100| [b3494e3c3eab98cfca8a39ce1122f79becbf7cfa] | committer: Michael Niedermayer

avcodec/pthread_slice: Remove rets_count

It appears rets_count is redundant

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/pthread_slice.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libavcodec/pthread_slice.c b/libavcodec/pthread_slice.c
index f2c05d8..e887428 100644
--- a/libavcodec/pthread_slice.c
+++ b/libavcodec/pthread_slice.c
@@ -50,7 +50,6 @@ typedef struct SliceThreadContext {
     action_func2 *func2;
     void *args;
     int *rets;
-    int rets_count;
     int job_count;
     int job_size;
 
@@ -100,7 +99,7 @@ static void* attribute_align_arg worker(void *v)
         ret = c->func ? c->func(avctx, (char*)c->args + our_job*c->job_size):
                                 c->func2(avctx, c->args, our_job, self_id);
         if (c->rets)
-            c->rets[our_job%c->rets_count] = ret;
+            c->rets[our_job%c->job_count] = ret;
 
         pthread_mutex_lock(&c->current_job_lock);
         our_job = c->current_job++;
@@ -165,10 +164,8 @@ static int thread_execute(AVCodecContext *avctx, action_func* func, void *arg, i
     c->func = func;
     if (ret) {
         c->rets = ret;
-        c->rets_count = job_count;
     } else {
         c->rets = NULL;
-        c->rets_count = 1;
     }
     c->current_execute++;
     pthread_cond_broadcast(&c->current_job_cond);



More information about the ffmpeg-cvslog mailing list