[FFmpeg-soc] [PATCH 3/9] Guard against avcodec_thread_execute() being called without being setup.
Alexander Strange
astrange at ithinksw.com
Thu May 29 05:42:27 CEST 2008
---
libavcodec/thread.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libavcodec/thread.c b/libavcodec/thread.c
index 702adb5..975cadd 100644
--- a/libavcodec/thread.c
+++ b/libavcodec/thread.c
@@ -105,6 +105,9 @@ int avcodec_thread_execute(AVCodecContext *avctx,
action_t* func, void **arg, in
ThreadContext *c= avctx->thread_opaque;
int dummy_ret;
+ if ((avctx->codec && avctx->codec->capabilities &
CODEC_CAP_FRAME_THREADS) || avctx->thread_count <= 1)
+ return avcodec_default_execute(avctx, func, arg, ret,
job_count);
+
if (job_count <= 0)
return 0;
--
1.5.5.1
More information about the FFmpeg-soc
mailing list