[FFmpeg-cvslog] pthread: validate_thread_parameters() ignored slice-threading being intentionally off

Alexander Strange git at videolan.org
Sun Apr 10 03:45:28 CEST 2011


ffmpeg | branch: master | Alexander Strange <astrange at ithinksw.com> | Sun Apr  3 15:54:14 2011 -0400| [cf39b461d31a213261cb7dab21e8aeb0bb1673d5] | committer: Ronald S. Bultje

pthread: validate_thread_parameters() ignored slice-threading being intentionally off

The thread_type API allows you to request only FF_THREAD_FRAME (instead of
FRAME | SLICE), but it was being ignored.
We don't implement both of them at the same time, so there isn't an effect
on current codecs, except that you can request no kinds of threading now
(a bit useless).

Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>

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

 libavcodec/pthread.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 70845f0..ba6e395 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -877,7 +877,7 @@ static void validate_thread_parameters(AVCodecContext *avctx)
         avctx->active_thread_type = 0;
     } else if (frame_threading_supported && (avctx->thread_type & FF_THREAD_FRAME)) {
         avctx->active_thread_type = FF_THREAD_FRAME;
-    } else {
+    } else if (avctx->thread_type & FF_THREAD_SLICE) {
         avctx->active_thread_type = FF_THREAD_SLICE;
     }
 }



More information about the ffmpeg-cvslog mailing list