Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/pthread.c7
-rw-r--r--libavcodec/utils.c2
2 files changed, 1 insertions, 8 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 1dbfe3d221..0ef4588a04 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -1042,23 +1042,16 @@ static void validate_thread_parameters(AVCodecContext *avctx)
int ff_thread_init(AVCodecContext *avctx)
{
- if (avctx->thread_opaque) {
- av_log(avctx, AV_LOG_ERROR, "avcodec_thread_init is ignored after avcodec_open\n");
- return -1;
- }
-
#if HAVE_W32THREADS
w32thread_init();
#endif
- if (avctx->codec) {
validate_thread_parameters(avctx);
if (avctx->active_thread_type&FF_THREAD_SLICE)
return thread_init(avctx);
else if (avctx->active_thread_type&FF_THREAD_FRAME)
return frame_thread_init(avctx);
- }
return 0;
}
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index c54af670e4..8a19393a26 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -963,7 +963,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
avctx->time_base.den = avctx->sample_rate;
}
- if (HAVE_THREADS && !avctx->thread_opaque) {
+ if (HAVE_THREADS) {
ret = ff_thread_init(avctx);
if (ret < 0) {
goto free_and_end;