Unified · Split
| @@ -849,14 +849,14 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code · 848 unmodified lines | |||
| 849 | 849 | ||
| 850 | /* If there is a user-supplied mutex locking routine, call it. */ | 850 | /* If there is a user-supplied mutex locking routine, call it. */ |
| 851 | if (ff_lockmgr_cb) { | 851 | if (ff_lockmgr_cb) { |
| 852 | if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN)) | 852 | if ((ret = (*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN)) < 0) |
| 853 | return -1; | 853 | return ret; |
| 854 | } | 854 | } |
| 855 | 855 | ||
| 856 | entangled_thread_counter++; | 856 | entangled_thread_counter++; |
| 857 | if (entangled_thread_counter != 1) { | 857 | if (entangled_thread_counter != 1) { |
| 858 | av_log(avctx, AV_LOG_ERROR, "Insufficient thread locking around avcodec_open/close()\n"); | 858 | av_log(avctx, AV_LOG_ERROR, "Insufficient thread locking around avcodec_open/close()\n"); |
| 859 | ret = -1; | 859 | ret = AVERROR(EINVAL); |
| 860 | goto end; | 860 | goto end; |
| 861 | } | 861 | } |
| 862 | 862 | ||